deutsch/2+order/3 from here gives:
?- time(( hydra(20, _X), hydra(19, _Y),
order_compare(C, _X, _Y))).
%@ % 2,485 inferences, 0.000 CPU in 0.001 seconds
%@ (0% CPU, Infinite Lips)
%@ C = (>).
You could first test speed of minimum_coa/2
and deutsch/2
.
You didn’t publish minimum_coa/2, so I cannot do the comparison
for you. I generally suspect methods that produce a new Prolog
term and not some integer index, to be the faster methods. I
do not think indirection of integer indexes makes any sense.
But you have also to look at the asymptotic behaviour,
like I did with member(N, [5,10,15])
. The asymptotic behaviour
tells you what is really going on.