[Haskell-cafe] ANNOUNCE: nobench: Haskell implementaion benchmarks. GHC v Hugs v Yhc v NHC v ...

Matthew Naylor mfn-haskell-cafe at cs.york.ac.uk
Mon Feb 19 15:12:14 EST 2007


Hi all,

> GHC v Hugs v Yhc v NHC v ...

     ...        Hacle & Clean!

I shoved 5 of the benchmarks that Donald used through Hacle, and
compiled the outputs using version 2.1 of the Clean compiler.  Results
are below.

As for the other examples, Hacle doesn't like non-Haskell98 and
translates arbitrary-precision integers to fixed-precision ones (!)

I'm not sure how well Hacle would work with nobench because input
files must be unambiguously-typed assuming a "default ()" at the top.
So some programs may require a little tweaking to go through.  Mind,
this was only a problem on 1 of the 5 programs I just tried...

Matt.

(Note: ignore the "65536" at the end of each Clean result -- my fault
for not compiling with the right options)

===================================================================
binarytrees (GHC)
===================================================================
stretch tree of depth 17	 check: -1
131072	 trees of depth 4	 check: -131072
32768	 trees of depth 6	 check: -32768
8192	 trees of depth 8	 check: -8192
2048	 trees of depth 10	 check: -2048
512	 trees of depth 12	 check: -512
128	 trees of depth 14	 check: -128
32	 trees of depth 16	 check: -32
long lived tree of depth 16	 check: -1

real	0m3.301s
user	0m3.280s
sys	0m0.016s
===================================================================
binarytrees (Clean)
===================================================================
Execution: 2.34  Garbage collection: 0.25  Total: 2.59
stretch tree of depth 17	 check: -1
131072	 trees of depth 4	 check: -131072
32768	 trees of depth 6	 check: -32768
8192	 trees of depth 8	 check: -8192
2048	 trees of depth 10	 check: -2048
512	 trees of depth 12	 check: -512
128	 trees of depth 14	 check: -128
32	 trees of depth 16	 check: -32
long lived tree of depth 16	 check: -1
65536

real	0m2.691s
user	0m2.592s
sys	0m0.100s
===================================================================
partial sums (GHC)
===================================================================
2.9999999999999987	(2/3)^k
3160.817621887086	k^-0.5
0.9999996000002026	1/k(k+1)
30.31454150956248	Flint Hills
42.99523399808393	Cookson Hills
15.30901715473893	Harmonic
1.644933666848388	Riemann Zeta
0.6931469805600944	Alternating Harmonic
0.7853980633974358	Gregory

real	0m4.887s
user	0m4.888s
sys	0m0.000s
===================================================================
partial sums (Clean)
===================================================================
Execution: 4.41  Garbage collection: 0.05  Total: 4.46
3	(2/3)^k
3160.81762188709	k^-0.5
0.999999600000203	1/k(k+1)
30.3145415095625	Flint Hills
42.9952339980839	Cookson Hills
15.3090171547389	Harmonic
1.64493366684839	Riemann Zeta
0.693146980560094	Alternating Harmonic
0.785398063397435	Gregory
65536

real	0m4.545s
user	0m4.468s
sys	0m0.076s
===================================================================
queens (GHC)
===================================================================
14200

real	0m1.990s
user	0m1.980s
sys	0m0.012s
===================================================================
queens (Clean)
===================================================================
Execution: 6.58  Garbage collection: 1.07  Total: 7.65
14200
65536

real	0m7.921s
user	0m7.656s
sys	0m0.264s
===================================================================
recursive (GHC)
===================================================================
Ack(3,9): 4093
Fib(36.0): 2.4157817e7
Tak(24,16,8): 9
Fib(3): 3
Tak(3.0,2.0,1.0): 2.0

real	0m5.232s
user	0m5.224s
sys	0m0.008s
===================================================================
recursive (Clean)
===================================================================
Execution: 2.40  Garbage collection: 0.00  Total: 2.40
Ack(3,9): 4093
Fib(36): 24157817
Tak(24,16,8): 9
Fib(3): 3
Tak(3,2,1): 2
65536

real	0m2.403s
user	0m2.400s
sys	0m0.000s
===================================================================
loop (GHC)
===================================================================
3.3333333333333335

real	0m1.039s
user	0m1.036s
sys	0m0.004s
===================================================================
loop (Clean)
===================================================================
Execution: 1.26  Garbage collection: 0.00  Total: 1.26
3.33333333333333
65536

real	0m1.325s
user	0m1.260s
sys	0m0.068s


More information about the Haskell-Cafe mailing list