4 ms·
I'm not sure if it's good form to reply to yourself here, but I did find this: https://lwn.net/Articles/276782/ https://lwn.net/Articles/276782/. It appears to
by fayten 6y ago
I'm not sure if it's good form to reply to yourself here, but I did find this: https://lwn.net/Articles/276782/ https://lwn.net/Articles/276782/.
It appears to be a 20 part series from a(the?) Gold developer on Linkers.
I checked HN and it looks like there is an old discussion here: https://news.ycombinator.com/item?id=9597406 https://news.ycombinator.com/item?id=9597406
So, I'll probably give this a read when I find time. Hopefully someone else will find it useful as well.
- cb321 6y agoCompiling an echo "hello world" module in Nim from scratch to a fully linked executable can be under 200 milliseconds on modern hardware with the TinyC/tcc backend. tcc has its own assembler and ELF linker built in to get that speed. I don't know much about fpc/free Pascal, but maybe it also does very little optimization of generated code and has its own assembler/linker. It think these are the Big Three things for a fast compile. To get a fast edit/compile/test workflow I just set up my default backend to be tcc and automatically switch to gcc if "-d:release" or "-d:danger" is given on the compile line { really I abbreviate that to "-d:r" :-) } This makes it easy to develop quickly and then switch right over to quick timing tests. Nim also has an interpreter whose startup is more like 100 ms, but which is limited to only what its virtual machine target (also used for compile-time computation) supports.