3 ms·
$ gcc -O2 -std=c99 -lm -o c c.c $ time ./c ./c 2.49s user 0.07s system 99% cpu 2.567 total $ nim -d:release c nim $ time ./nim ./nim 2.47s user 0.07
by def- 12y ago
$ gcc -O2 -std=c99 -lm -o c c.c
$ time ./c
./c 2.49s user 0.07s system 99% cpu 2.567 total
$ nim -d:release c nim
$ time ./nim
./nim 2.47s user 0.07s system 99% cpu 2.538 total
Yes, --opt:speed is slower indeed:
$ nim --opt:speed c nim
$ time ./nim
./nim 3.02s user 0.07s system 99% cpu 3.095 total