Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
tim333
· 8y ago · 0 comments
Ah yes. sum(range()) in Python vs for(i=1...) in js was much closer, about 20% quicker in javascript.
Comments
[–]
gengkev
8y ago
Won't this calculation overflow to +Infinity in JavaScript after a while? On the other hand, Python will try to compute the actual result using arbitrary precision integers, which is that's slower.