4 ms·
I repeated the experiment with 200 000 lines of code, where each line contains an assigment (just a constant) followed by a print statement (printf / std::cout)
by stabbles 8y ago
I repeated the experiment with 200 000 lines of code, where each line contains an assigment (just a constant) followed by a print statement (printf / std::cout). Results on my Macbook Air are similar:
$ time g++ cpp.cpp
real 2m28,454s
$ time gcc c.c
real 0m7,112s
Compilers are indeed really slow.