Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Re: How to process each byte in a binary file?

by John M. Dlugosz (Monsignor)
on Aug 13, 2002 at 00:46 UTC ( [id://189685]=note: print w/replies, xml ) Need Help??


in reply to Re: How to process each byte in a binary file?
in thread How to process each byte in a binary file?

I get similar results: split is between regex and substr. Makes me wonder, though, since split// is a "special case" that splits on every character, why it isn't simply as fast as unpack?

—John

  • Comment on Re: Re: How to process each byte in a binary file?

Replies are listed 'Best First'.
Re: Re: Re: How to process each byte in a binary file?
by kschwab (Vicar) on Aug 13, 2002 at 03:05 UTC
    I added a test case for just using read(FILE,1) from a real file, and it's about the same speed as the unpack() on a string (for largish strings).

    Of course, this leaves the file open the whole time..but it's wonderfully simple :) I also have a very expensive Netapp filer helping the speed with read-ahead and a huge cache..YMMV.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (2)
As of 2024-04-19 18:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found