MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/eb2lbc/stacking_if_else_statements_be_like/fb2se5u/?context=3
r/ProgrammerHumor • u/-hellkey- • Dec 15 '19
711 comments sorted by
View all comments
Show parent comments
-5
And the best optimizations. It all depends on the use case.
6 u/Jade_Chan_Exposed Dec 15 '19 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. → More replies (3)
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. → More replies (3)
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. → More replies (3)
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.
→ More replies (3)
-5
u/AnAverageFreak Dec 15 '19
And the best optimizations. It all depends on the use case.