Timeline for answer to When did compilers start generating optimized code that runs faster than an average programmer's assembly code? by Bill Ferguson
Current License: CC BY-SA 4.0
Post Revisions
8 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Oct 1, 2021 at 15:20 | comment | added | Mark Ransom | @introspec the actual reasons why the speed-optimized code was slower are irrelevant, unless it was a temporary bug that was long ago fixed. And as I said that wasn't the only example I've seen, just the first one to pop up when I did a search. | |
| Sep 30, 2021 at 22:48 | comment | added | Mark Ransom | @introspec see for example Why does GCC generate 15-20% faster code if I optimize for size instead of speed?. I don't think that was the first time I heard of it either. | |
| Sep 30, 2021 at 22:03 | comment | added | introspec | @MarkRansom, as an experienced assembly programmer, I believe it to be almost never true. You can almost always get a bit of extra speed by sacrificing some memory. So what you are observing, is not an indication of efficiency of small programs, but conversely, an indication of the compiler inability to optimize for speed all that well. | |
| Sep 30, 2021 at 19:08 | comment | added | Mark Ransom | @introspec one surprising finding from compilers that could be optimized for speed or size via a switch was that the programs optimized for size tended to be faster as well. | |
| Sep 16, 2020 at 13:44 | comment | added | introspec | Seriously, how is this even an argument? The assembly code may have been optimized for speed, so the fact that optimizing compiler produced a shorter code is frankly meaningless without side-by-side comparison of both speed and size of both routines. | |
| Sep 15, 2020 at 22:26 | comment | added | Janka | I did a fairly big hand-coded assembler project on a ATtiny88 and a C compiler for sure couldn't have made it fit but it had a stack leak which took me one day to find, so I strongly advise against it. | |
| Sep 15, 2020 at 11:41 | comment | added | Tomachi | That's pretty kewl. | |
| Sep 15, 2020 at 0:36 | history | answered | Bill Ferguson | CC BY-SA 4.0 |