On Sat, 21 Jan 2017 13:52:37 -0800, ale...@yahoo.com wrote:
> m: my int $i = 0; while $i < 10_000_000 {  $i++ }; say now - INIT
> now;rakudo-moar 7f245f: OUTPUT«5.1848902␤»
> m: my (int $i, int $nosink) = 0, 0; while $i < 10_000_000 {  $nosink =
> $i++ }; say now - INIT now;rakudo-moar 7f245f: OUTPUT«0.0816566␤»

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;'
0.06727072
jnthn@lviv:~/dev/rakudo$ ./perl6-m -e 'my (int $i, int $nosink) = 0, 0; while 
$i < 10_000_000 {  $nosink = $i++ }; say now - INIT now;'
0.0737980

/jnthn

Reply via email to