Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing native candidate for %% #2387

Closed
zoffixznet opened this issue Oct 17, 2018 · 0 comments
Closed

Missing native candidate for %% #2387

zoffixznet opened this issue Oct 17, 2018 · 0 comments

Comments

@zoffixznet
Copy link
Contributor

zoffixznet commented Oct 17, 2018

The %/== version is 7.02x as fast as %% version. I imagine the reason is %% is missing a native candidate.

<Zoffix_> m: my int $x = 42; my $ = ($x % 2 == 0) for ^10_000_000; say now - ENTER now
<camelia> rakudo-moar 4bf55b1ef: OUTPUT: «0.70281471␤»

<Zoffix_> m: my int $x = 42; my $ = ($x %% 2) for ^10_000_000; say now - ENTER now
<camelia> rakudo-moar 4bf55b1ef: OUTPUT: «4.9368135␤»
2018.09 zoffix@VirtualBox~$ perl6 -e '.signature.say for &infix:<%%>.candidates'                                                                                                                                                                               
()
($)
(Int:D \a, Int:D \b)
(\a, \b)

2018.09 zoffix@VirtualBox~$ perl6 -e '.signature.say for &infix:<%>.candidates'                                                                                                                                                                                
()
($x)
(\a, \b)
(Real \a, Real \b)
(Int:D \a, Int:D \b --> Int:D)
(int $a, int $b --> int)
(Num:D \a, Num:D \b)
(num $a, num $b --> num)
(Rational:D \a, Int:D \b)
(Int:D \a, Rational:D \b)
(Rational:D \a, Rational:D \b)
(Duration:D $a, Real $b)

2018.09 zoffix@VirtualBox~$ perl6 -v
This is Rakudo version 2018.09 built on MoarVM version 2018.09
implementing Perl 6.c.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant