Come for the quick hacks, stay for the epiphanies. | |
PerlMonks |
Re: Challenge: CPU-optimized byte-wise or-equals (for a meter of beer)by ikegami (Patriarch) |
on Sep 12, 2007 at 14:13 UTC ( [id://638561]=note: print w/replies, xml ) | Need Help?? |
Bit ops?
tr should be faster.
Benchmarks:
Corion's solution humbles my ass-kicking solution! I wonder if a higher density of zeros would boost my rating? Update: Added tr variant.
In Section
Seekers of Perl Wisdom
|
|