That script could probably have used POSIX::_exit() to get the same speedup without the calling process thinking it crashed.
uWSGI, a web application container for Python, Perl and other languages has an option for that:
--skip-atexit-teardown
- Unreferencing objects recursively, therefore tracing all objects.
- Calling destructor functions.
- Potentially doubling idle memory use due to copy-on-write as all the objects are written to.
When a web application server restarts all its child processes, the third item in particular can result in a large spike in memory use.