[Shootout-list] Added C# -- But a problem...
Isaac Gouy
igouy2@yahoo.com
Mon, 9 Aug 2004 12:24:59 -0700 (PDT)
> All C# tests complete in 0.06 user time, which leads me to believe we
> aren't measuring the component of the system actually doing the work
For Ackermann, measurements on Gentoo Linux using the fork/exec/waitpid
technique seem to be directly comparable to Java:
Java Mono C#
n=4 0.13 0.11
n=5 0.13 0.11
n=6 0.13 0.12
n=7 0.15 0.13
n=8 0.21 0.19
n=9 0.49
n=10 4.98
Mono measurements:
$cuser $csys ($cuser+$csys)
Ack(3,4): 125
Mono C# 0.1 0.01 0.11
Ack(3,5): 253
Mono C# 0.11 0 0.11
Ack(3,6): 509
Mono C# 0.1 0.02 0.12
Ack(3,7): 1021
Mono C# 0.11 0.02 0.13
Ack(3,8): 2045
Mono C# 0.19 0 0.19
Ack(3,9): 4093
Mono C# 0.48 0.01 0.49
Ack(3,10): 8189
Mono C# 4.96 0.02 4.98
Perl script:
use BSD::Resource qw(times);
my($cu0, $cs0) = (BSD::Resource::times)[2,3];
unless (defined ($pid = fork)) {die "cannot fork: $!"; }
unless ($pid) { exec 'mono ackermann.exe 4'; exit; }
waitpid($pid, 0);
my($cuser, $csys) = (BSD::Resource::times)[2,3];
$cuser -= $cu0;
$csys -= $cs0;
$t = $cuser + $csys;
print "Mono C# $cuser $csys $t\n\n";
__________________________________
Do you Yahoo!?
Yahoo! Mail is new and improved - Check it out!
http://promotions.yahoo.com/new_mail