Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re^2: Efficient bit counting with a twist.

by BrowserUk (Pope)
on Jan 27, 2013 at 08:33 UTC ( #1015567=note: print w/replies, xml ) Need Help??


in reply to Re: Efficient bit counting with a twist.
in thread Efficient bit counting with a twist.

Why pack 'V'?

substr( $v, $p / 8, 1 ) is a byte, why mask with 4 bytes?


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.
div class=Why

Replies are listed 'Best First'.
Re^3: Efficient bit counting with a twist.
by quester (Vicar) on Jan 27, 2013 at 09:02 UTC
    Oh. That. It's just force of habit, I adapted this bit of code from the way I code bitmasks for IPv4 subnets. It would make more sense to code it as pack 'C',... rather than pack 'V', although it works either way.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1015567]
help
Chatterbox?
[Tanktalus]: My basic problem right now is that if I were willing to move, I could be back in Toronto with a pay raise. We have a number of reasons for not wanting to do that.
[marioroy]: I had to backslash the backslash inside qx.
[Tanktalus]: marioroy++ # nice catch
[Lady_Aleena]: marioroy, that makes kinda makes sense.
[Discipulus]: yes i can survive also in younger town.. but when i passed i saw many strange letters..
[Lady_Aleena]: marioroy, sorry, I am not making sense right now.

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (8)
As of 2017-04-23 20:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I'm a fool:











    Results (432 votes). Check out past polls.