benchmark for trailing & coroutining
Fergus Henderson
fjh at cs.mu.oz.au
Fri Sep 26 22:09:39 AEST 1997
Here's some updated benchmark figures -- the figures for dqueens
(the coroutining Prolog version) were wrong.
Also I've added figures for the `asm_fast.tr' grade.
--------------------
Here's the results of a benchmark of three different versions
of the N-queens problem (for N = 10).
In order simplest to most complicated:
"queens" is the simple "generate & test" solution.
"dqueens" is a coroutining "test & generate" solution using when/block decls.
"vqueens" is a coroutining "test & generate" solution using freeze/2.
"cqueens" is a non-coroutining "interleaved generate-test" solution.
This was on kryten, using `-O6 --intermodule-optimization'.
program grade user sys real %cpu slowdown vs asm_fast
------- ----- --- --- ---- ----
cqueens asm_fast 0.01u 0.05s 0:00.10 60.0% 1.0
queens asm_fast 0.43u 0.07s 0:00.53 94.3% 1.0
cost of trail
cqueens asm_fast.tr 0.01u 0.05s 0:00.10 60.0% 1.0 ~0
queens asm_fast.tr 0.55u 0.06s 0:00.64 95.3% 1.2 ~20%
vqueens asm_fast.tr 0.04u 0.05s 0:00.13 69.2%
cost of GC
cqueens asm_fast.gc 0.06u 0.21s 0:00.33 81.8% 3.30 230%
queens asm_fast.gc 1.43u 0.25s 0:01.73 97.1% 3.26 226%
cost of
GC + trailing
cqueens asm_fast.gc.tr 0.12u 0.20s 0:00.34 94.1% 3.40 230% + ~10%
queens asm_fast.gc.tr 1.58u 0.26s 0:01.92 95.8% 3.62 226% + ~40%
vqueens asm_fast.gc.tr 0.13u 0.22s 0:00.39 89.7%
slowdown vs Mercury
cqueens NU-Prolog 0.18u 0.29s 0:00.52 90.3% 5.2 asm_fast
5.2 asm_fast.tr
1.6 asm_fast.gc
1.5 asm_fast.gc.tr
queens NU-Prolog 6.63u 0.33s 0:07.01 99.2% 13.2 asm_fast
11.0 asm_fast.tr
4.1 asm_fast.gc
3.7 asm_fast.gc.tr
dqueens NU-Prolog 0.17u 0.31s 0:00.51 94.1% 3.9 asm_fast.tr
1.3 asm_fast.gc.tr
cqueens SICSTUS compact 0.16u 0.47s 0:00.67 94.0% 6.7 asm_fast
6.7 asm_fast.tr
2.0 asm_fast.gc
1.7 asm_fast.gc.tr
queens SICSTUS compact 4.82u 0.46s 0:05.34 98.8% 10.1 asm_fast.tr
3.1 asm_fast.gc
2.8 asm_fast.gc.tr
dqueens SICSTUS compact 0.15u 0.48s 0:00.67 94.0% 5.2 asm_fast.tr
1.7 asm_fast.gc.tr
--
Fergus Henderson <fjh at cs.mu.oz.au> | "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh> | of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3 | -- the last words of T. S. Garp.
More information about the developers
mailing list