Live data from Hacker News

Let's compile like it's 1992 (2014)

fabiensanglard.net

1–10 of 84 posts

Re: Let's compile like it's 1992 (2014)

#2
If you have a few hours (or days) free, go through the rest of Fabien's source code reviews and articles. It's fantastic stuff. I really hope he does finish up the book he's writing on the Wolfenstein 3D engine.

Re: Let's compile like it's 1992 (2014)

#4
post #3

Let's play the game "Wolfenstein miscompilation or Dwarf Fortress screenshot?": http://fabiensanglard.net/Compile_Like_Its_1992/images/run_w...

I just see an ASCII interpretation of the TV channels my mom told me to stay away from.

Hey, I think I see a pair of @'s

Re: Let's compile like it's 1992 (2014)

#6
post #5

No mention of how much time it took to compile? I don't know if my memory is faulty but I remember Turbo C++ to be much much faster than today's C++ compilers.

In 1992 it probably wouldn't have had templates nor much of much else (it wasn't standardized until 1998). Modern C++ is barely the same language anymore.

Re: Let's compile like it's 1992 (2014)

#7
post #5

No mention of how much time it took to compile? I don't know if my memory is faulty but I remember Turbo C++ to be much much faster than today's C++ compilers.

I don't know about c++, but turbo pascal compiled so fast that it felt like an interpreter back in the day.

Re: Let's compile like it's 1992 (2014)

#8
post #5

No mention of how much time it took to compile? I don't know if my memory is faulty but I remember Turbo C++ to be much much faster than today's C++ compilers.

That is an understatement. That is a full build of my 3D engine - http://i.imgur.com/3ApRyuQ.png (C not C++ but the linked article is also about a C codebase) on my current computer (4770K i7) under Borland C++ 5.0. Partial builds (modify a file and run) are instant, which is basically why i'm using it for a lot of my C code (the code also compiles in other compilers, like OpenWatcom, GCC, Clang, Visual Studio, Digital Mars C and Pelles C, but i mainly test with GCC, OW and VS, the rest i only test with occasionally).

The compiler is part of the IDE, not some external process that needs to start from a blank state for each file, needing to read the same files over and over (which is what every other "IDE" does these days, similarly with the debugger which is usually running gdb at the background and some IDEs do not even bother to perform the builds themselves and instead using cmake or whatever - honestly it is as if people forgot what the "I" stands for) and it keeps compiled objects and libraries in memory and even uses the source code directly from the open windows's text buffers instead of having to save the file and load it from disk (although it does write the object and executable files to disk, it just doesn't do the unnecessary roundtrip for compiling the source).

Re: Let's compile like it's 1992 (2014)

#9
post #6
post #5

No mention of how much time it took to compile? I don't know if my memory is faulty but I remember Turbo C++ to be much much faster than today's C++ compilers.

In 1992 it probably wouldn't have had templates nor much of much else (it wasn't standardized until 1998). Modern C++ is barely the same language anymore.

Borland C++ 3.1 (mentioned in the article) does have templates, although it doesn't have nested templates. It also didn't have namespaces (i think that was added in 5.0, which was still released before the first C++ standard).

Keep in mind that the C++98 mainly standardized what compilers were already doing.

Re: Let's compile like it's 1992 (2014)

#10
post #5

No mention of how much time it took to compile? I don't know if my memory is faulty but I remember Turbo C++ to be much much faster than today's C++ compilers.

That is an understatement. That is a full build of my 3D engine - http://i.imgur.com/3ApRyuQ.png (C not C++ but the linked article is also about a C codebase) on my current computer (4770K i7) under Borland C++ 5.0. Partial builds (modify a file and run) are instant, which is basically why i'm using it for a lot of my C code (the code also compiles in other compilers, like OpenWatcom, GCC, Clang, Visual Studio, Digit…

This is interesting. How long does GCC take? Have you tried TCC?
Post reply on HN