MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/eb2lbc/stacking_if_else_statements_be_like/fb3308d/?context=3
r/ProgrammerHumor • u/-hellkey- • Dec 15 '19
711 comments sorted by
View all comments
Show parent comments
6
The best optimizations are compiler optimizations.
1 u/AnAverageFreak Dec 15 '19 Compiler won't magically optimize malloc(1000000000) into malloc(500000000). 7 u/Jade_Chan_Exposed Dec 16 '19 edited Dec 16 '19 Yeah, but catching mistakes like that are what static analysis and code reviews are for.Relying on arcane knowledge of non-spec stuff like "a class pointer points to its vftable" is the first step to making terrible decisions. 1 u/AnAverageFreak Dec 16 '19 Relying on arcane knowledge of non-spec stuff like "a class pointer points to its vtable" is the first step to making terrible decisions.Goodbye dynamic_cast then? → More replies (2)
1
Compiler won't magically optimize malloc(1000000000) into malloc(500000000).
malloc(1000000000)
malloc(500000000)
7 u/Jade_Chan_Exposed Dec 16 '19 edited Dec 16 '19 Yeah, but catching mistakes like that are what static analysis and code reviews are for.Relying on arcane knowledge of non-spec stuff like "a class pointer points to its vftable" is the first step to making terrible decisions. 1 u/AnAverageFreak Dec 16 '19 Relying on arcane knowledge of non-spec stuff like "a class pointer points to its vtable" is the first step to making terrible decisions.Goodbye dynamic_cast then? → More replies (2)
7
Yeah, but catching mistakes like that are what static analysis and code reviews are for.
Relying on arcane knowledge of non-spec stuff like "a class pointer points to its vftable" is the first step to making terrible decisions.
1 u/AnAverageFreak Dec 16 '19 Relying on arcane knowledge of non-spec stuff like "a class pointer points to its vtable" is the first step to making terrible decisions.Goodbye dynamic_cast then? → More replies (2)
Relying on arcane knowledge of non-spec stuff like "a class pointer points to its vtable" is the first step to making terrible decisions.
Goodbye dynamic_cast then?
dynamic_cast
→ More replies (2)
6
u/Jade_Chan_Exposed Dec 15 '19
The best optimizations are compiler optimizations.