3 ms·
I submit that this viewpoint is very mistaken. If it were true, "users of C compilers" would just compile with optimizations off and there would not be any prob
by MauranKilom 5y ago
I submit that this viewpoint is very mistaken. If it were true, "users of C compilers" would just compile with optimizations off and there would not be any problem. Evidently, "most of the other users" do care about performance. Unsurprisingly, I might add.
- Gibbon1 5y agoIf I am mistaken why do most programmers prefer slower to vastly slower languages such as JavaScript, Java, C#, Go, Python, PHP, or Lua? If they really thought that speed was the most important thing wouldn't that abandon those languages for C++. Explain yourself.
- rowanG077 5y agoIt's the opposite. People use C and C++ because of their speed. If you don't need the speed then there is little reason to use C or C++. This makes these optimization absolutely vital for C and C++.
- dmz73 5y agoI think a lot (not all) of people will use C and C++ because they need good performance, compile time checks, portability across OS/CPU architectures and reasonable memory usage. Most of the people who use C and C++ are average programmers who think their programs will do exactly what they wrote in the source code. The issue is that optimizations are required to get expected performance but some optimizations will result in programs not doing what user specified in the source code. Compiler should offer a clear split between "safe" optimizations that will not change what source code says and "unsafe" optimizations that will do their best to create fastest code. I don't use C or C++ very often and I don't know how optimizations are currently structured but if a lot of people are constantly caught unaware of what optimizations are in use and how they affect the output then this is obviously either a documentation issue or compiler interface issue - both of these are up to compiler writers to fix.
- rowanG077 5y agoWhat the source code says it does is exactly specced in the language standard. If the compiler changes this then that's a compiler bug. What you really meant to say is what people assume source code does, not what it says it does.
- josephcsible 5y agoDistinguish programs not doing what the user specified in the source code from programs not doing what the user incorrectly thought they specified in the source code.
- benibela 5y agoI have always used Pascal for those reasons, and fast compilation speed FreePascal only does safe optimizations. (unless it has bugs where it does work at all)
- MauranKilom 5y ago> why do most programmers prefer slower to vastly slower languages such as JavaScript, Java, C#, Go, Python, PHP, or Lua? So your argument is "people not using C don't care about the speed of C"? What is this supposed to be proving?
- jhgb 5y agoDoesn't Wirth actually believe the same thing about compilers? Specifically the part about > compiler writers care a lot about how fast compilers are. So they desperately add more optimizations to speed up the compiler program. But which adds more work to the process of compiling a program.