News for hackers. Stuff that matters.
Re:“Clean” Code, Horrible Performance by rolldat777 on Tuesday February 28, 2023 @05:46PM (#34976017)
I think this is the point. In the example given, if you introduce a sqrt, then the argument becomes much weaker already. The dispatch is comparable to the computation time. I'm reminded of "Latency Numbers Every Programmer Should Know".

I actually just had this debate with myself, specifically about shape classes including circles and bezier curves. However, the operation was instead intersections. There was zero performance difference in that case after profiling so I kept the OOP so that the code wasn't full of case statements.

There are no comments on this comment yet.