2 ms·
Yes, it's exactly as you say. I did search for benchmark comparisons and bumped into one that had 2 orders of magnitude difference. But naturally, isolated be
by kapolos 4y ago
Yes, it's exactly as you say.
I did search for benchmark comparisons and bumped into one that had 2 orders of magnitude difference.
But naturally, isolated benchmarks can't encapsulate the whole picture because there's a world of difference between testing how fast a loop runs and performance in production.
- codedokode 4y agoI guess that arithmetic operations are not very slow in Python, but if you use objects, then Python performs complicated lookups for every field or method access.