Y
Hacker News
new
|
ask
|
show
|
jobs
by
emsy
2490 days ago
Python already doesn't have the best performance. If you need to round a lot of floats in a loop you better bring some time.
2 comments
pletnes
2490 days ago
Or use numpy, like the rest of us.
link
sqrt17
2490 days ago
round() is specifically about rounding to decimal places, and there are other, faster functions for the more common cases
link