Hacker News new | ask | show | jobs
by kazinator 3334 days ago
Sometimes the situation is completely reversed: you get a lot more computing resources on the development system where the code is compiled, than on the target system where it ultimately runs (e.g. small, embedded target).

The computing resources required to process the code (macros, and whatever) is usually unrelated to the computing resources of the application.

A program that works with gigabytes or data might need only megabytes during its compilation.

(It's not easy to imagine practical circumstances where it would be reversed, with those exact numbers. Some algorithms you might want to use at compile time do explode in memory size, I suppose.)

1 comments

That is getting quite normal nowadays; training a model in machine learning typically takes way more resources than running it.

However, if you need gigabyte to expand your macros, it is likely you need megaseconds, too, and then, it is wise to use 'precompiled headers', and save your 'preprocessor output'.