|
|
|
Clear questions and runnable code get the best and fastest answer |
|
| PerlMonks |
Comment on |
| ( #3333=superdoc: print w/ replies, xml ) | Need Help?? |
|
I need to break unsigned 32-bit values into 4 parts: (from the msb) 14-bits, 6-bits, 6-bits, 6-bits; (using perl rather than I::C or XS). That can be done as follows:
But I need to do this millions of times, so I'm looking to see if there is a more efficient way? (I don't care if I get 4 separate variables or an array with 4 values.) Note: This is for me; no one else. Elegance, readability and maintainability are simply not considerations here. Just speed. Any suggestions? With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
In reply to Efficient bit-twiddling in Perl. by BrowserUk
|
|