4 ms·
There has been a lot of discussion in recent years about how cheap that "cheaply" really is. * https://news.ycombinator.com/item?id=9653238 https://news.ycombi
by JdeBP 8y ago
There has been a lot of discussion in recent years about how cheap that "cheaply" really is.
* https://news.ycombinator.com/item?id=9653238 https://news.ycombinator.com/item?id=9653238
* https://news.ycombinator.com/item?id=18071278 https://news.ycombinator.com/item?id=18071278
* https://news.ycombinator.com/item?id=19622503 https://news.ycombinator.com/item?id=19622503
- cryptonector 8y agoYeah, it's not really cheap at all. However! vfork() is cheap, very very cheap, though, of course, you then have to follow it up with an exec(), and the cost of that on Windows depends on the setup cost of the executable being exec'ed. Part of the problem is the DLLs, as many have mentioned, and also the fact that each statically links in its own CRT (C run-time). The shared C run-time MSFT is working on should help here. As should more lazy loading and setup.
- dblohm7 8y ago> Part of the problem is the DLLs, as many have mentioned, and also the fact that each statically links in its own CRT (C run-time) No, that isn't the case on DLLs shipped with Windows.
- cryptonector 8y agoBut it is for 3rd party DLLs.
- dblohm7 8y agoWell, that depends on the DLL.
- kazinator 8y agofork is pretty much always going to be cheaper than starting a new process in scratch over the same executable image (and library images) and then re-playing everything inside that process so that it gets into exactly the same state as the creator to be a de facto clone of it.