in reply to Re: Re6: Anyone use "xor" in conditionals?
in thread Anyone use "xor" in conditionals?
I suspect that this will be roughly twice as fast as yours:
and Benchmark says...map { join ".", unpack "C*", $_ } sort map { pack "C*", split /\./, $_ } @ips;
Drat, only 50% faster. (: Probably because the S. Transform is specially optimized these days.Rate slow faster tye slow 0.575/s -- -75% -83% faster 2.34/s 307% -- -32% tye 3.45/s 501% 48% --
Full code in HTML comments at top of node so "download code" will fetch it for you.
- tye
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^9: [IP Sorting] Anyone use "xor" in conditionals? (faster)
by zengargoyle (Deacon) on Jul 16, 2003 at 00:22 UTC | |
by RMGir (Prior) on Feb 27, 2004 at 12:40 UTC |