Improved fork-exec loop performance