Hi David,
I wrote a small module to help benchmark time in library(profiler(profiler_extra)), just see the following example that measure the reverse/2 predicate:
:- module(_, _, []).
:- use_module(library(profiler(profiler_extra))).
:- use_module(library(lists)).
mytest(Time) :-
��� length(List, 1000),
��� measure(reverse(List, _Rev), Time).
By default the time is given in the maximum resolution unit available in the system.� In Intel, for example, it is given in cpu cycles.� For milliseconds, you can use measure(Goal, walltime, Time). Just see the ciao/contrib/profiler/profiler_extra.pl file, I guess it is not too difficult to follow.
Best Regards,
Edison.
How do people run simple timing tests in Ciao? In SWI-Prolog I can do the following:benchmark1 :-� flag(benchmark,_,0),� repeat,� zebra1(Houses, WaterDrinker, ZebraOwner),� flag(benchmark,N,N+1),� N = 1000,� !.benchmark :- time(benchmark1).What is the equivalent in Ciao?Thanks!David
_______________________________________________
Ciao-users mailing list
Ciao-users@clip.dia.fi.upm.es
http://clip.dia.fi.upm.es/cgi-bin/mailman/listinfo/ciao-users