×
Login Register an account
Top Submissions Explore Upgoat Search Random Subverse Random Post Colorize! Site Rules
1

Clean code, horrible performance

submitted by Kung_Flu to anything 1.2 yearsMar 4, 2023 09:37:02 ago (+1/-0)     (yewtu.be)

https://yewtu.be/watch?v=tD5NrevFtbU



2 comments block


[ - ] Prairie 0 points 1.2 yearsMar 6, 2023 02:23:24 ago (+0/-0)

The guy can't take any discussion as he has comments turned off.

It's all true, you can make a given piece of code tens, hundreds of times faster by rewriting in less flexible, less maintainable ways. But actual software tends to spend most of its time in a very small portion of the code. So the rest of the code could be clean or optimized asm and not make much difference. This is a good thing. If you write clean code to start with, you an always optimize the hot spots later, and you always have the clean version as a reference or fallback.

[ - ] Kung_Flu [op] 0 points 1.2 yearsMar 6, 2023 20:02:58 ago (+0/-0)

The first half of the video made sense. Then in the second half, he started using hardcoded tables and basically pre-calcuating everything so his program was extremely inflexible. And that's when I noticed the comments were turned off. What a joke.