How to test the performance of a Prolog program?

前端 未结 3 2054
佛祖请我去吃肉
佛祖请我去吃肉 2021-01-06 14:23

Is there any way to do some benchmarking on several Prolog programs? I am using SWI-Prolog, and it doesn\'t show the time taken to execute the query!!

3条回答
  •  清酒与你
    2021-01-06 14:55

    What about time/1? In SWI-Prolog, try:

    ?- time(your_goal).
    

    and

    ?- profile(your_goal).
    

提交回复
热议问题