3 ms·
Ah yes. sum(range()) in Python vs for(i=1...) in js was much closer, about 20% quicker in javascript.
by tim333 8y ago
Ah yes. sum(range()) in Python vs for(i=1...) in js was much closer, about 20% quicker in javascript.
- gengkev 8y agoWon'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.