var x = 0; for(i <- 1 to 100000000) /* x += */ i Uncommenting makes this about 4x faster. More expensive to discard a result than add it?!
-
-
Replying to @propensive
@propensive It's probably boxing the Int in the slower case.1 reply 0 retweets 0 likes -
Replying to @propensive
@propensive scalac can be a bit thick at times. I haven't checked this particular case though.1 reply 0 retweets 0 likes
Replying to @ijuma
@ijuma I'll let it off, just this once. On balance it's quite smart... ;)
10:09 AM - 15 Apr 2014
from Poplar, London
0 replies
0 retweets
0 likes
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.