Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^2: Byte repetition check

by FloydATC (Deacon)
on Dec 11, 2014 at 11:29 UTC ( [id://1110036]=note: print w/replies, xml ) Need Help??


in reply to Re: Byte repetition check
in thread Byte repetition check

Why not read the file (or blocks of it, if it's too large to conveniently fit into memory) into a buffer and then process that buffer?

This would add a couple of lines of code, but it would save you thousands of system calls and improve performance immensely.

Looping through a buffer could then be done using substr() or by split()ting the buffer into an @array which you can then foreach() through.

-- FloydATC

Time flies when you don't know what you're doing

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1110036]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (4)
As of 2024-04-20 02:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found