in reply to Re: strncmp functionality
in thread strncmp functionality
and came up with:index(substr($str[$_], 0, $n), $str[$_ + 1], 0) != 0
Thoughts or comments?Benchmark: running eq_index, eq_substr, each for at least 10 CPU secon +ds... eq_index: 14 wallclock secs (10.08 usr + 0.00 sys = 10.08 CPU) @ 3 +.08/s (n=31) eq_substr: 16 wallclock secs (10.30 usr + 0.00 sys = 10.30 CPU) @ 3 +.01/s (n=31) Rate eq_substr eq_index eq_substr 3.01/s -- -2% eq_index 3.08/s 2% --
-Lynn
update (broquaint): added formatting
|
|---|