root/trunk/examples/benchmarks/SCRIPT.txt

Revision 4662, 1.7 KB (checked in by pmoura, 5 days ago)

Updated copyright notice.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1================================================================
2Logtalk - Open source object-oriented logic programming language
3Release 2.35.0
4
5Copyright (c) 1998-2009 Paulo Moura.        All Rights Reserved.
6Logtalk is free software.  You can redistribute it and/or modify
7it under the terms of the "Artistic License 2.0" as published by
8The Perl Foundation. Consult the "LICENSE.txt" file for details.
9================================================================
10
11
12% start by loading the example by choosing one of the loader files
13% (you must quit and restart Logtalk for each testing scenario):
14
15
16% run benchmarks with event support turned on:
17
18| ?- logtalk_load(benchmarks(loader_events)).
19...
20
21
22% run benchmarks with event support turned off:
23
24| ?- logtalk_load(benchmarks(loader_no_events)).
25...
26
27
28% run benchmarks with event support turned off and using static binding:
29
30| ?- logtalk_load(benchmarks(loader_static_binding)).
31...
32
33
34% list all the benchmark tests:
35
36| ?- benchmarks::benchmark(Id, Goal).
37
38Goal = my_length([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19],_)
39Id = s1 ? ;
40
41Goal = object::length([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19],_)
42Id = s2 ? ;
43
44Goal = leaf::obj_local
45Id = c1 ? ;
46
47Goal = leaf::ctg_direct
48Id = c2 ? ;
49
50Goal = leaf::ctg_self
51Id = c3 ? ;
52
53Goal = create_object(xpto,[],[],[]),abolish_object(xpto)
54Id = d1 ? ;
55
56Goal = plain_dyndb
57Id = d2 ? ;
58
59Goal = database::this_dyndb
60Id = d3 ? ;
61
62Goal = database::self_dyndb
63Id = d4 ? ;
64
65Goal = database::obj_dyndb
66Id = d5
67
68yes
69
70
71% run all the benchmark tests the default number of times:
72
73| ?- benchmarks::run.
74...
75
76
77% or run specific benchmark tests individually, for example:
78
79
80| ?- benchmarks::run(s1, 1000000).
81...
Note: See TracBrowser for help on using the browser.