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
Autoincrement much slower in sink context #6026
Comments
From alex6k@yahoo.comm: my int $i = 0; while $i < 10_000_000 { $i++ }; say now - INIT now;rakudo-moar 7f245f: OUTPUT«5.1848902» |
From @zoffixznetOn Sat, 21 Jan 2017 13:52:37 -0800, alex6k@yahoo.com wrote:
More accurately: it's much faster when not sunk, as it gets optimized. Turn off the optimizer and the difference vanishes: zoffix@VirtualBox:~$ perl6 -e 'my int $i = 0; while $i < 200_000 { $ = $i++; $ = 42 }; say now - INIT now;' |
The RT System itself - Status changed from 'new' to 'open' |
From @jnthnOn Sat, 21 Jan 2017 13:52:37 -0800, alex6k@yahoo.com wrote:
The static inlining of the ++ operator was failing to take place in sink context. Fixed that, and now the first example is faster, as you'd expect: jnthn@lviv:~/dev/rakudo$ ./perl6-m -e 'my int $i = 0; while $i < 10_000_000 { $i++ }; say now - INIT now;' /jnthn |
@jnthn - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#130615 (status was 'resolved')
Searchable as RT130615$
The text was updated successfully, but these errors were encountered: