Re:One million lines of code ought to be enough for anybody
by glofish on Wednesday December 18, 2019 @04:00PM
(#21829400)
the main purpose of the exercise was to explore what happens when you throw 1M lines of code to a language,
our estimates to what happens could be wildly inaccurate,
I was pleased with Python finishing in 5 seconds because I thought it might not even work at all due to some internal implementation detail that I was not aware of - like the ruby example that fails with a stack error. I am pleased to see that Python can handle it.
As for the GCC compilation I find it quite unexpected that it compiles 10K lines in just 0.3 seconds, but then seems to hang on 100K lines. Not so easy to explain.
Compilation is technically NP-Hard, meaning it scales very poorly, as you described, whereas interpretation is not (no register allocation, etc).
https://cs.stackexchange.com/questions/22435/time-complexity...