I think so too. I solved that question with your very helpful answer.
I take this opportunity to ask you other two smaller questions. I'm trying to make some tests on some popular Prolog systems, like SWI-Prolog, SICStus, because I'd like, for my thesis, to show a comparison between the execution time necessary for solving a query with Tail Call Optimization enabled and the time spent with no optimization. In SWI-Prolog that's easy, because there is an appropriate flag, which can be changed with the set_prolog_flag/2 predicate. In SICStus, instead, I didn't found anything like that. I tried to add to my theory a dummy goal to avoid tail call optimization, but it seems not to work (execution time doesn't change). Do you have any suggestions? Do you know other Prolog systems in which it is simple to disable tail call optimization?
Moreover, to measure execution time, I write the following line: statistics (runtime, [T0|_]), doReps(fatt(20,F), 1000), statistics(runtime, [T1|_]), T is T1 -T0. DoReps is a predicate that I created to run the same query many times. The theory is about factorial computation. (in the example: 20!) I noticed that the time stored in the T variable changes every time I run the line above. Am I making some mistake?
Thank you again,
Silvia Umiliacchi
----Messaggio originale---- Da: Bart.Demoen(a)cs.kuleuven.be Data: 26/07/2011 19.53 A: "silviaumiliacchi(a)libero.it"<silviaumiliacchi(a)libero.it> Cc: <ciao-users(a)clip.dia.fi.upm.es> Ogg: Re: [Ciao-users] R: Re: Question about tail call optimization
first of all, thank you for your answer. You caught my doubt very well. It would be very helpful if you could send me the report you told about.
I think something is wrong with ciao-users(a)clip.dia.fi.upm.es. This was posted about a month ago and answered - no ?
Cheers
Bart Demoen
Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm
Hi Silvia,
I would recommend to include LPA's Win-Prolog in your performance tests as well as it is still one of the fastest implementations I know. It delivers about 100 MLIPS (optimized) and about 70 MLIPS (unoptimized) on my i7-notebook).
Best regards, Markus Schacher KnowBody
P.S.: Bridging the gap between Business and IT: - KnowEnterprise(R) is the world's first enterprise repository that integrates OMGs business and IT standards! - Find-out more at http://www.knowgravity.com/eng/value/knowEnterprise.htm (in English) - or at http://www.knowgravity.com/ger/value/knowEnterprise.htm (in German)
-------------------------------- KnowGravity Inc. Hohlstrasse 534 CH-8048 Zürich Switzerland Tel +41 (0)44 43 42 000 Dir +41 (0)44 43 42 001 Fax +41 (0)44 43 42 009 http://www.knowgravity.com
-----Original Message----- From: ciao-users-bounces(a)clip.dia.fi.upm.es [mailto:ciao-users-bounces(a)clip.dia.fi.upm.es] On Behalf Of silviaumiliacchi(a)libero.it Sent: Mittwoch, 27. Juli 2011 15:44 To: Bart.Demoen(a)cs.kuleuven.be Cc: ciao-users(a)clip.dia.fi.upm.es Subject: [Ciao-users] R: Re: R: Re: Question about tail call optimization Importance: High
I think so too. I solved that question with your very helpful answer.
I take this opportunity to ask you other two smaller questions. I'm trying to make some tests on some popular Prolog systems, like SWI-Prolog, SICStus, because I'd like, for my thesis, to show a comparison between the execution time necessary for solving a query with Tail Call Optimization enabled and the time spent with no optimization. In SWI-Prolog that's easy, because there is an appropriate flag, which can be changed with the set_prolog_flag/2 predicate. In SICStus, instead, I didn't found anything like that. I tried to add to my theory a dummy goal to avoid tail call optimization, but it seems not to work (execution time doesn't change). Do you have any suggestions? Do you know other Prolog systems in which it is simple to disable tail call optimization?
Moreover, to measure execution time, I write the following line: statistics (runtime, [T0|_]), doReps(fatt(20,F), 1000), statistics(runtime, [T1|_]), T is T1 -T0. DoReps is a predicate that I created to run the same query many times. The theory is about factorial computation. (in the example: 20!) I noticed that the time stored in the T variable changes every time I run the line above. Am I making some mistake?
Thank you again,
Silvia Umiliacchi
----Messaggio originale---- Da: Bart.Demoen(a)cs.kuleuven.be Data: 26/07/2011 19.53 A: "silviaumiliacchi(a)libero.it"<silviaumiliacchi(a)libero.it> Cc: <ciao-users(a)clip.dia.fi.upm.es> Ogg: Re: [Ciao-users] R: Re: Question about tail call optimization
first of all, thank you for your answer. You caught my doubt very well. It would be very helpful if you could send me the report you told about.
I think something is wrong with ciao-users(a)clip.dia.fi.upm.es. This was posted about a month ago and answered - no ?
Cheers
Bart Demoen
Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm
_______________________________________________ Ciao-users mailing list Ciao-users(a)clip.dia.fi.upm.es http://clip.dia.fi.upm.es/cgi-bin/mailman/listinfo/ciao-users