in reply to Fastest byteswap (little endian to big endian (eg. 34127856 -> 12345678)
Before v5.20 the copy on write feature of string was not activated by default. This means that you may win a little time by avoiding to copy the strings in multiple scalars: print $output pack("v*", unpack("n*", scalar <$fh>));
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Fastest byteswap (little endian to big endian (eg. 34127856 -> 12345678)
by ikegami (Patriarch) on Apr 14, 2015 at 12:48 UTC | |
by Eily (Monsignor) on Apr 14, 2015 at 14:38 UTC | |
by ikegami (Patriarch) on Apr 14, 2015 at 18:19 UTC | |
by ikegami (Patriarch) on Apr 14, 2015 at 18:42 UTC | |
by Eily (Monsignor) on Apr 15, 2015 at 08:06 UTC | |
|