Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re^5: Challenge: CPU-optimized byte-wise or-equals (for a meter of beer) (addr math)

by tye (Sage)
on Sep 13, 2007 at 01:29 UTC ( [id://638717]=note: print w/replies, xml ) Need Help??


in reply to Re^4: Challenge: CPU-optimized byte-wise or-equals (for a meter of beer) (addr math)
in thread Challenge: CPU-optimized byte-wise or-equals (for a meter of beer)

Yes, memchr() and related items usually end up implementing their loop in a single machine-language instruction on most processors. Given the relative infrequency of '\0' bytes, the added complexity of computation when one is found is outweighed by the much more efficient finding of them.

- tye        

  • Comment on Re^5: Challenge: CPU-optimized byte-wise or-equals (for a meter of beer) (addr math)

Log In?
Username:
Password:

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

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

    No recent polls found