Hacker News new | ask | show | jobs
by mschuster91 1621 days ago
Most compilers are one of the prime cases of inefficient architecture, the worse the larger the project gets. There is an awful lot of time lost waiting on I/O for hundreds to thousands of files (even assuming that there is enough RAM for the OS to cache all the files and metadata, every file that is read has at least three syscall context switches for open/read/close, dito for intermediate writes) and for process creation and destruction.

What I would find really, really interesting: a "single-process" compiler that has a global in-RAM cache for all source contents and intermediate outputs and can avoid the overhead of child processes... basically a model like Webpack or Parcel that has an inotify watcher and is constantly running. The JS world had no other choice with NodeJS/npm all but forcing the tooling to adapt to a lot of incredibly small source files, it's time for the "classic" world to adapt.