4 ms·
That is the way to do the math, but not the way to write the code. That said, I would like for my compiler to combine any multiplications involved down to one
by ncmncm 4y ago
That is the way to do the math, but not the way to write the code.
That said, I would like for my compiler to combine any multiplications involved down to one factor for input to the fastest sin/cos operations the machine has. And, to treat resulting multipliers close enough to 1, 1/2, and 1/4 as exact, and then skip the multiplication entirely.
But the second part is a hard thing to ask of a compiler.
- doliveira 4y agoYeah, seems to me that languages should allow way more semantic expression than most do today. I wish I had done CS, those kinds of compiler optimization sounds so fun. I'd love to work on that
- ncmncm 4y agoGood news, optimization is engineering, not CS. CS is all about what a program would eventually do, if you were ever to run it. Once you run it, you have moved to the domain of technicians. Engineering is about making it run better.