Even if you develop in C# or Java you should look at the assembler generated. Then adapt your programming style to make the most optimal assembler output. I had many fights with colleagues that claimed that that specific Intel compiler created superior assembler output. I kept on telling them that the compiler does not matter, when you learn how C++ gets translated to assembler then you can also discover how you can write your code so the assembler is always optimal.
When you rely on the C++ compiler to create better results, then you get random results. But if you learn yourself how to alter the C+ code then you get 100% guaranteed fastest results.
One such example I have learned back then/ register calling convention only works for 4 arguments you pass on. The fifth will be stored on the stack and requires a PUSH and POP, which is slower. So I always limited the number of parameters to 4 (static method) 3 (object method)
Passionate and adept programmers seem to be a rarity today. I blame "everyone can code" and the "normies" finding out that programming paid really well.
Valid point. I had the opportunity to employ and work with some brilliant programmers. I hired my first in 1992 and it was a lot like herding cats, but they were brilliant. Without them, I'd not be where I am today.
4 comments
0 u/roznak 10 Dec 2017 21:52
Even if you develop in C# or Java you should look at the assembler generated. Then adapt your programming style to make the most optimal assembler output. I had many fights with colleagues that claimed that that specific Intel compiler created superior assembler output. I kept on telling them that the compiler does not matter, when you learn how C++ gets translated to assembler then you can also discover how you can write your code so the assembler is always optimal.
When you rely on the C++ compiler to create better results, then you get random results. But if you learn yourself how to alter the C+ code then you get 100% guaranteed fastest results.
One such example I have learned back then/ register calling convention only works for 4 arguments you pass on. The fifth will be stored on the stack and requires a PUSH and POP, which is slower. So I always limited the number of parameters to 4 (static method) 3 (object method)
0 u/TheBuddha [OP] 10 Dec 2017 21:55
Passionate and adept programmers seem to be a rarity today. I blame "everyone can code" and the "normies" finding out that programming paid really well.
0 u/roznak 11 Dec 2017 00:41
People are not aware anymore that they suck at programming. When everyone else sucks too then you simply don't know.
0 u/TheBuddha [OP] 11 Dec 2017 00:48
Valid point. I had the opportunity to employ and work with some brilliant programmers. I hired my first in 1992 and it was a lot like herding cats, but they were brilliant. Without them, I'd not be where I am today.