3 ms·
There is no misuse of anything. Stop being so presumptuous and shortsighted, especially on hacker news. Is there some theoretical bounds or anything preventing
by rq1 8y ago
There is no misuse of anything. Stop being so presumptuous and shortsighted, especially on hacker news.
Is there some theoretical bounds or anything preventing the compilers to be faster or is it just implementation/optimization details?
(GHC tends also to be quite slow.)
- intea 8y agoC++ compilation is massively slowed down by the sheer existence of the preprocessor. This could be drastically improved by the usage of modules which are coming soon(tm). Both MSVC and Clang already support them experimentally fwiw.
- Koshkin 8y agoTo be fair, what slows down compilation is not "the sheer existence" but the extensive use of large and complex #include files.
- geezerjay 8y agoIndeed. IIRC this topic is covered directly in Meyers' "Effective C++" book, including the trick to use pointers + forward declarations in headers to avoid including other headers.
- theoh 8y agoThe argument could be made that compile-time processing is highly appropriate for the static inputs of a program, and, at the other extreme, obviously can't be applied to the dynamic inputs. (Terminology from https://en.wikipedia.org/wiki/Partial_evaluation https://en.wikipedia.org/wiki/Partial_evaluation) Of course, the raytracer source code is the dynamic input of a compiler. The Futamura projection perspective suggests interesting options here for e.g. specializing raytracers in relation to particular scenes.