Sunday, January 31, 2016

Duration of execution: Comparison Between Perl & C

Perl script counting from 1 to 1,000,000,000:
$ time ./countlargenumber.pl
500000000500000000
real 0m43.157s
user 0m43.013s
sys 0m0.019s


Executable written in C counting from 1 to 1,000,000,000:
$ time ./countlargenumber.out
500000000500000000
real 0m2.057s
user 0m2.028s
sys 0m0.002s