http://www.perlmonks.org?node_id=1046599


in reply to Re: In-place bitwise NOT?
in thread In-place bitwise NOT?

That certainly works and doesn't appear to do any copying. It comes out at nearly 50% faster than tr//:

C:\test>1046579 -N=2**20 Rate str translate C str 656/s -- -8% -37% translate 713/s 9% -- -32% C 1047/s 60% 47% --

The only downside is that it imposes the need for a compiler on a module that otherwise doesn't need one.


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.