Re:AMD ships microcode update to disable some branch prediction
by tzahola on Friday January 05, 2018 @04:16PM
(#16081717)
* Only if you use branches in your code.
[ Parent
| on HN ]
Re:AMD ships microcode update to disable some branch prediction
by PopsiclePete on Friday January 05, 2018 @07:05PM
(#16082881)
I never liked those "if" statements! "IF"? Why is there an "if"? It implies you're uncertain, or have hesitations, doubts even? That's rookie shit. I never do. Straight and happy path for this cowboy, always.
Re:AMD ships microcode update to disable some branch prediction
by tzahola on Friday January 05, 2018 @07:26PM
(#16082986)
If you have conditionals in your program, it means that you're trying to do too many things at once. Follow the UNIX philosophy: do one thing, and do it well!
Re:AMD ships microcode update to disable some branch prediction
by fib on Friday January 05, 2018 @10:58PM
(#16083765)
And always run every program and always pass every option! Do everything well!
Re:AMD ships microcode update to disable some branch prediction
by earenndil on Saturday January 06, 2018 @04:01AM
(#16084487)
No branches if you movfuscate[1] your code! You do end up with that happy path, that straight path, that clean path that's wholly immune to those pesky branching bugs.
Re:AMD ships microcode update to disable some branch prediction
by Asdfbla on Friday January 05, 2018 @07:27PM
(#16082995)
A for loop also is an implicit branch, by the way. At least it will be compiled to something with a conditional jump.
So being unsure about how many times you want to do a thing is a no-go too.
Re:AMD ships microcode update to disable some branch prediction
by pertymcpert on Friday January 05, 2018 @09:04PM
(#16083419)
Not if it's a known constant trip count, then you can fully unroll it. No more branches!
If the trip count isn't known at compile time? You should find out.
Re:AMD ships microcode update to disable some branch prediction
by deepnotderp on Friday January 05, 2018 @04:28PM
(#16081834)
Yeah, who uses those?
/s