2 ms·
No, it's not - at least not inherently -, because unless you're extremely memory constrained your program will be cached in memory. If it's then also prepared
by vidarh 3y ago
No, it's not - at least not inherently -, because unless you're extremely memory constrained your program will be cached in memory.
If it's then also prepared properly, e.g statically linked position independent code, you won't even have relocation overhead and the only thing you "pay" is the process creation overhead, which hasn't been a major issue on at least Linux for a couple of decades at least.
Whether the difference will matter really depends on your specific runtime. With an interpreter, startup can easily bite you hard, sure.
PHP is a bad example for that reason - the moment you need a bunch of extra syscalls on startup, the context switch latency alone will kill performance vs. what you can achieve.