2 ms·
It's funny that you're talking about this in a Python context, because pretty much every few lines will be 50-100x overhead. I take your point that Python would
by 59nadir 3y ago
It's funny that you're talking about this in a Python context, because pretty much every few lines will be 50-100x overhead. I take your point that Python would probably slow this type of thing down even more than it should, but still... Python is the exact type of language where this type of generalization to something slower but "more correct" makes sense in my opinion.
For what it's worth I agree with you when it comes to languages where 50+x overhead isn't an ever-present fact; you should generally have to opt in to using decimal types and the like.