in reply to Re: Why is "any" slow in this case?
in thread Why is "any" slow in this case?

You have the 'return 1' in the wrong place...

Replies are listed 'Best First'.
Re^3: Why is "any" slow in this case?
by sleet (Monk) on Jul 28, 2025 at 07:44 UTC
    oops, my bad:
    Rate any_cr any ugly ugly_cr hash any_cr 869/s -- -38% -54% -65% -77% any 1395/s 61% -- -26% -43% -63% ugly 1896/s 118% 36% -- -23% -49% ugly_cr 2465/s 184% 77% 30% -- -34% hash 3725/s 329% 167% 96% 51% --
      On a tangent, I often thought Benchmark would have been better designed with an additional testing interface, allowing to make sure one is not comparing apples with oranges.

      Cheers Rolf
      (addicted to the Perl Programming Language :)
      see Wikisyntax for the Monastery