What I tell everyone who doubts the value of optimizing compilers is that they're not there to make your code fast...
-
-
-
They're there to keep people from writing idiotic unmaintainable code in the pursuit of having it be fast.
- 2 more replies
New conversation -
-
-
I write x/3 only because I know that the compiler handles it correctly. If it didn't, I wouldn't write it =)
-
I feel like pretending that folding rules like div-by-constant->mul+shifts or x*(-1) -> -x and say autovect are in
- 2 more replies
New conversation -
-
-
Do you mean with integer x specifically? Float one translates in pretty straightforward way.
-
Integer.
- 2 more replies
New conversation -
-
-
please don't discourage people from writing `x / 3` just to prove a point.
-
AFAIK, it is pretty much standard though for compilers to replace x/const cases with shifts and/or multiply-by-reciprocal.
- 4 more replies
New conversation -
-
-
We should start a “Compilers & PL Misconceptions FAQ”. First entry: “How can Rust be safe if its libraries use unsafe”
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
If anyone thinks they are smarter than optimizing compilers give them a copy of Hacker's Delight. It'll humble them for sure.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.