Re:Good Refactoring vs. Bad Refactoring
by jholman on Tuesday August 20, 2024 @10:54PM
(#41306348)
If you don't care about performance, we can make that code a lot shorter.
The "fast inverse square root" is absolutely 100% all about performance. For it to make sense to use as a counter-example, you need to show alternate code that still meets the contract (the contract being: be as fast as this code), that is longer, and clearer.
[ Parent
| on HN ]
Re:Good Refactoring vs. Bad Refactoring
by _a_a_a_ on Wednesday August 21, 2024 @11:17AM
(#41311152)
I was saying that shorter code is not necessarily more readable. But what you're talking about is optimisation and I'm fine with that, uglier code for higher speed (or whatever). But is that refactoring? I don't think so. I may have led you a bit down the garden path here.