-
-
Save zoffixznet/8d4296b6a8caf089319475a1dc7a43b3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use Test; | |
subtest 'performance of ≤, ≥, ≠ compared to Texas versions' => { | |
sub measure (&code) { code for ^300; with now { code for ^100_000; now - $_ } } | |
is-approx { rand ≤ rand }.&measure, { rand <= rand }.&measure, '≤', :rel-tol<.5>; | |
is-approx { rand ≥ rand }.&measure, { rand >= rand }.&measure, '≥', :rel-tol<.5>; | |
is-approx { rand ≠ rand }.&measure, { rand != rand }.&measure, '≠', :rel-tol<.5>; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment