如何测试 Prolog 程序的性能? [英] How to test the performance of a Prolog program?

查看:53
本文介绍了如何测试 Prolog 程序的性能?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法对几个 Prolog 程序进行一些基准测试?我正在使用 SWI-Prolog,它没有显示执行查询所需的时间!!

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!!

推荐答案

time/1 怎么样?在 SWI-Prolog 中,尝试:

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

?- time(your_goal).

?- profile(your_goal).

这篇关于如何测试 Prolog 程序的性能?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆