Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic

Re^2: In-place bitwise NOT?

by BrowserUk (Pope)
on Jul 26, 2013 at 19:54 UTC ( #1046599=note: print w/ replies, xml ) Need Help??

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.
Comment on Re^2: In-place bitwise NOT?
Download Code

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (5)
As of 2016-05-28 02:21 GMT
Find Nodes?
    Voting Booth?