Was tracking down some performance anomalies in my code when I discovered the following on MacOS-Intel:
Peirera benchmarks 9.2.3:
?- benches.
Correct to: "bench_peirera:benches"? yes
tail_call_atom_atom took 0.51-0.10=0.40/145946 = 2.8 usec/iter.
binary_call_atom_atom took 0.50-0.06=0.44/94737 = 4.6 usec/iter.
cons_list took 0.38-0.06=0.32/91525 = 3.5 usec/iter.
walk_list took 0.49-0.08=0.40/122727 = 3.3 usec/iter.
walk_list_rec took 0.37-0.09=0.29/125581 = 2.3 usec/iter.
args(1) took 0.36-0.08=0.27/120000 = 2.3 usec/iter.
args(2) took 0.34-0.06=0.28/81818 = 3.4 usec/iter.
args(4) took 0.48-0.04=0.44/54545 = 8.1 usec/iter.
args(8) took 0.42-0.02=0.39/33333 = 11.8 usec/iter.
args(16) took 0.47-0.01=0.46/19355 = 23.6 usec/iter.
cons_term took 0.39-0.06=0.33/84375 = 3.9 usec/iter.
walk_term took 0.44-0.07=0.36/110204 = 3.3 usec/iter.
walk_term_rec took 0.47-0.08=0.39/122727 = 3.2 usec/iter.
shallow_backtracking took 0.32-0.29=0.02/415385 = 0.1 usec/iter.
deep_backtracking took 0.27-0.04=0.23/59341 = 3.8 usec/iter.
choice_point took 0.70-0.07=0.64/94737 = 6.7 usec/iter.
trail_variables took 0.64-0.06=0.58/87097 = 6.6 usec/iter.
medium_unify took 0.85-0.55=0.30/771429 = 0.4 usec/iter.
deep_unify took 0.74-0.16=0.58/235161 = 2.5 usec/iter.
integer_add took 0.66-0.03=0.63/49091 = 12.8 usec/iter.
floating_add took 0.62-0.03=0.59/40909 = 14.4 usec/iter.
arg(1) took 0.17-0.03=0.14/40000 = 3.5 usec/iter.
arg(2) took 0.17-0.03=0.14/40909 = 3.5 usec/iter.
arg(4) took 0.16-0.03=0.13/37500 = 3.5 usec/iter.
arg(8) took 0.16-0.03=0.13/38217 = 3.5 usec/iter.
arg(16) took 0.16-0.03=0.13/38298 = 3.5 usec/iter.
index took 0.49-0.07=0.42/100000 = 4.2 usec/iter.
assert_unit took 1.65-0.00=1.65/1525 = 1080.0 usec/iter.
access_unit took 0.28-0.02=0.26/26471 = 9.8 usec/iter.
slow_access_unit took 0.02-0.00=0.02/1607 = 10.0 usec/iter.
setof took 0.16-0.01=0.16/7692 = 20.5 usec/iter.
pair_setof took 0.21-0.01=0.20/6522 = 31.1 usec/iter.
double_setof took 0.30-0.00=0.30/1837 = 163.9 usec/iter.
bagof took 0.17-0.01=0.16/10112 = 16.0 usec/iter.
34 benchmarks took 12.20 seconds
true.
Peirera benchmarks 9.2.4:
?- benches.
Correct to: "bench_peirera:benches"? yes
tail_call_atom_atom took 0.66-0.26=0.40/145946 = 2.8 usec/iter.
binary_call_atom_atom took 0.59-0.17=0.43/94737 = 4.5 usec/iter.
cons_list took 0.48-0.16=0.32/91525 = 3.5 usec/iter.
walk_list took 0.62-0.21=0.41/122727 = 3.3 usec/iter.
walk_list_rec took 0.50-0.22=0.28/125581 = 2.2 usec/iter.
args(1) took 0.48-0.21=0.28/120000 = 2.3 usec/iter.
args(2) took 0.43-0.14=0.29/81818 = 3.5 usec/iter.
args(4) took 0.49-0.10=0.40/54545 = 7.3 usec/iter.
args(8) took 0.45-0.06=0.39/33333 = 11.6 usec/iter.
args(16) took 0.47-0.03=0.44/19355 = 22.7 usec/iter.
cons_term took 0.48-0.15=0.33/84375 = 4.0 usec/iter.
walk_term took 0.57-0.19=0.37/110204 = 3.4 usec/iter.
walk_term_rec took 0.62-0.22=0.41/122727 = 3.3 usec/iter.
shallow_backtracking took 0.75-0.73=0.03/415385 = 0.1 usec/iter.
deep_backtracking took 0.33-0.10=0.23/59341 = 3.9 usec/iter.
choice_point took 0.80-0.17=0.64/94737 = 6.7 usec/iter.
trail_variables took 0.72-0.15=0.57/87097 = 6.5 usec/iter.
medium_unify took 1.69-1.38=0.31/771429 = 0.4 usec/iter.
deep_unify took 1.02-0.42=0.60/235161 = 2.6 usec/iter.
integer_add took 3.26-0.09=3.17/49091 = 64.7 usec/iter.
floating_add took 2.79-0.07=2.72/40909 = 66.4 usec/iter.
arg(1) took 0.21-0.07=0.14/40000 = 3.4 usec/iter.
arg(2) took 0.21-0.07=0.14/40909 = 3.5 usec/iter.
arg(4) took 0.20-0.07=0.13/37500 = 3.5 usec/iter.
arg(8) took 0.20-0.07=0.13/38217 = 3.5 usec/iter.
arg(16) took 0.20-0.07=0.13/38298 = 3.5 usec/iter.
index took 0.61-0.18=0.43/100000 = 4.3 usec/iter.
assert_unit took 1.66-0.00=1.66/1525 = 1087.9 usec/iter.
access_unit took 0.31-0.05=0.27/26471 = 10.0 usec/iter.
slow_access_unit took 0.02-0.00=0.01/1607 = 9.3 usec/iter.
setof took 0.17-0.01=0.16/7692 = 20.5 usec/iter.
pair_setof took 0.21-0.01=0.20/6522 = 31.1 usec/iter.
double_setof took 0.31-0.00=0.30/1837 = 164.9 usec/iter.
bagof took 0.18-0.02=0.17/10112 = 16.4 usec/iter.
34 benchmarks took 16.87 seconds
true.
All pretty consistent other than integer_add
and floating_add
which are about 5 times slower moving to 9.2.4 (and is still the case in 9.2.7).