Logtalk 2.30.1 files.
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1903 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
@@ -1,136 +1,69 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.29.5
|
||||
================================================================
|
||||
Logtalk - Open source object-oriented logic programming language
|
||||
Release 2.30.1
|
||||
|
||||
Copyright (c) 1998-2007 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
================================================================
|
||||
|
||||
|
||||
% start by loading the example:
|
||||
% start by loading the example by choosing one of the loader files
|
||||
% (you must quit and restart Logtalk for each testing scenario):
|
||||
|
||||
| ?- logtalk_load(benchmarks(loader)).
|
||||
|
||||
% run benchmarks with event support turned on:
|
||||
|
||||
| ?- logtalk_load(benchmarks(loader_events)).
|
||||
...
|
||||
|
||||
|
||||
% run the default set of benchmark tests:
|
||||
% run benchmarks with event support turned off:
|
||||
|
||||
| ?- benchmarks.
|
||||
| ?- logtalk_load(benchmarks(loader_no_events)).
|
||||
...
|
||||
|
||||
|
||||
% or run specific benchmark tests individually as exemplified next...
|
||||
% run benchmarks with event support turned off and using static binding:
|
||||
|
||||
| ?- logtalk_load(benchmarks(loader_static_binding)).
|
||||
...
|
||||
|
||||
|
||||
% call the predicate my_length/0 defined in the Prolog database:
|
||||
% list all the benchmark tests:
|
||||
|
||||
| ?- generate_list(30, List), benchmark(my_length(List, _)).
|
||||
| ?- benchmarks::benchmark(Id, Goal).
|
||||
|
||||
Goal = my_length([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19],_)
|
||||
Id = s1 ? ;
|
||||
|
||||
Goal = object::length([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19],_)
|
||||
Id = s2 ? ;
|
||||
|
||||
Goal = create_object(xpto,[],[],[]),abolish_object(xpto)
|
||||
Id = d1 ? ;
|
||||
|
||||
Goal = plain_dyndb
|
||||
Id = d2 ? ;
|
||||
|
||||
Goal = database::this_dyndb
|
||||
Id = d3 ? ;
|
||||
|
||||
Goal = database::self_dyndb
|
||||
Id = d4 ? ;
|
||||
|
||||
Goal = database::obj_dyndb
|
||||
Id = d5
|
||||
|
||||
Number of repetitions: 100000
|
||||
Loop time: 0.03 seconds
|
||||
Goal time: 0.39 seconds
|
||||
Average time per call: 3.6e-06 seconds
|
||||
Number of calls per second: 277777.777777778
|
||||
List = [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29] ?
|
||||
yes
|
||||
|
||||
|
||||
% call the predicate object::length/2 from the top-level:
|
||||
% run all the benchmark tests the default number of times:
|
||||
|
||||
| ?- generate_list(30, List), benchmark(object::length(List, _)).
|
||||
|
||||
Number of repetitions: 100000
|
||||
Loop time: 0.04 seconds
|
||||
Goal time: 0.79 seconds
|
||||
Average time per call: 7.5e-06 seconds
|
||||
Number of calls per second: 133333.333333333
|
||||
List = [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29] ?
|
||||
yes
|
||||
| ?- benchmarks::run.
|
||||
...
|
||||
|
||||
|
||||
% compiled call of the predicate object::length/2 (simulates message sending
|
||||
% from a compiled object to another object; thus with no top-level overhead):
|
||||
|
||||
| ?- generate_list(30, List), benchmark('$lgt_send_to_object_nv'(object, length(List, _), user)).
|
||||
|
||||
Number of repetitions: 100000
|
||||
Loop time: 0.0299999999999998 seconds
|
||||
Goal time: 0.5 seconds
|
||||
Average time per call: 4.70000000000001e-06 seconds
|
||||
Number of calls per second: 212765.957446808
|
||||
List = [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29] ?
|
||||
yes
|
||||
% or run specific benchmark tests individually, for example:
|
||||
|
||||
|
||||
% compiled call of the predicate object::length/2 (simulates message sending
|
||||
% from a compiled object to another object with event-driven programming
|
||||
% support switched off and with no top-level overhead):
|
||||
|
||||
| ?- generate_list(30, List), benchmark('$lgt_send_to_object_ne_nv'(object, length(List, _), user)).
|
||||
|
||||
Number of repetitions: 100000
|
||||
Loop time: 0.0300000000000002 seconds
|
||||
Goal time: 0.46 seconds
|
||||
Average time per call: 4.3e-06 seconds
|
||||
Number of calls per second: 232558.139534884
|
||||
List = [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29] ?
|
||||
yes
|
||||
|
||||
|
||||
% create and abolish an elementary dynamic object:
|
||||
|
||||
| ?- benchmark((create_object(xpto, [], [], []), abolish_object(xpto))).
|
||||
|
||||
Number of repetitions: 100000
|
||||
Loop time: 0.0300000000000011 seconds
|
||||
Goal time: 51.59 seconds
|
||||
Average time per call: 0.0005156 seconds
|
||||
Number of calls per second: 1939.48797517455
|
||||
yes
|
||||
|
||||
|
||||
% test assertz/1 and retract/1 performance in plain Prolog:
|
||||
|
||||
| ?- benchmark(db_test_plain).
|
||||
|
||||
Number of repetitions: 100000
|
||||
Loop time: 0.0299999999999727 seconds
|
||||
Goal time: 51.07 seconds
|
||||
Average time per call: 0.0005104 seconds
|
||||
Number of calls per second: 1959.24764890282
|
||||
yes
|
||||
|
||||
|
||||
% test assertz/1 and retract/1 performance on "this" database:
|
||||
|
||||
| ?- benchmark('$lgt_send_to_object_ne_nv'(database, db_test_this, user)).
|
||||
|
||||
Number of repetitions: 100000
|
||||
Loop time: 0.0299999999999727 seconds
|
||||
Goal time: 63.37 seconds
|
||||
Average time per call: 0.0006334 seconds
|
||||
Number of calls per second: 1578.78118092832
|
||||
yes
|
||||
|
||||
|
||||
% test assertz/1 and retract/1 performance on "self" database:
|
||||
|
||||
| ?- benchmark('$lgt_send_to_object_ne_nv'(database, db_test_self, user)).
|
||||
|
||||
Number of repetitions: 100000
|
||||
Loop time: 0.0299999999999727 seconds
|
||||
Goal time: 71.3499999999999 seconds
|
||||
Average time per call: 0.000713199999999999 seconds
|
||||
Number of calls per second: 1402.13123948402
|
||||
yes
|
||||
|
||||
|
||||
% test assertz/1 and retract/1 performance on another object database (using ::/2):
|
||||
|
||||
| ?- benchmark('$lgt_send_to_object_ne_nv'(database, db_test_obj, user)).
|
||||
|
||||
Number of repetitions: 100000
|
||||
Loop time: 0.0299999999999727 seconds
|
||||
Goal time: 68.97 seconds
|
||||
Average time per call: 0.0006894 seconds
|
||||
Number of calls per second: 1450.53669857847
|
||||
yes
|
||||
| ?- benchmarks::run(s1, 1000000).
|
||||
...
|
||||
|
||||
Reference in New Issue
Block a user