Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: what's faster than .=

by crenz (Priest)
on Mar 08, 2003 at 13:32 UTC ( [id://241378]=note: print w/replies, xml ) Need Help??


in reply to what's faster than .=

If you really need to shave off some speed, you might want to rethink your approach. I know neither your underlying data source nor your protocol, but you should check whether you really can only get one byte at a time, since you seem to be processing the data in blocks anyway.

A common approach is to read a block of n bytes from the serial port/keyboard/.... If the routine you use to read is blocking (ie., it won't return until it has collected n bytes), you can use a timeout to make sure you don't wait forever.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (9)
As of 2024-04-23 13:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found