3 ms·
Windows does not fork processes as fast as Linux, although this is improved somewhat in the in the Windows Subsystem for Linux. Here is a somewhat foolish test
by chasil 3y ago
Windows does not fork processes as fast as Linux, although this is improved somewhat in the in the Windows Subsystem for Linux.
Here is a somewhat foolish test with a shell script, that forks "/bin/true" 10 million times.
C:\>busybox sh
~ $ echo 'x=10000000; while [ $x -gt 0 ]; do true; x=$((x-1)); done' > timetest
~ $ time sh timetest
real 0m 46.86s
user 0m 46.76s
sys 0m 0.04s
Here is the same test with Debian's dash shell, one of the fastest:
$ cat timetest
x=10000000; while [ $x -gt 0 ]; do true; x=$((x-1)); done
$ time dash timetest
0m33.79s real 0m33.50s user 0m0.05s system
Not a great test, but there is quite a difference there.