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.
|
|---|