3 ms·
It's becoming harder to trick the optimizer all the time. I mean, the goal of an optimizer is literally not to be able to be tricked into doing work it doesn't
by TheLoneWolfling 12y ago
It's becoming harder to trick the optimizer all the time.
I mean, the goal of an optimizer is literally not to be able to be tricked into doing work it doesn't have to.
- JoachimSchipper 12y agoYes; e.g. http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/lib/libc/string/explicit_bzero.c http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/lib/libc/string... demonstrates that rather well. Still, it is and will remain possible - and for the intended use, that's probably good enough. (It's not write - and - forget code where tricking the optimizer is security-critical.)
- TheLoneWolfling 12y agoIf you're having to trick the optimizer, you're doing something wrong. If the language is such that there are things in the language that inherently require tricking the optimizer, the language is doing it wrong.