SWI Prolog vs Chez Scheme/Shen Prolog on Einstein's Riddle under the S kernel

43 views
Skip to first unread message

dr.mt...@gmail.com

unread,
Aug 25, 2023, 1:44:58 PM8/25/23
to Shen
I'm writing this up.  I ran Einstein's Riddle 100 times under SWI Prolog and Chez Scheme/Shen Prolog kernel S 34.6.  I was pleasantly surprised to find the two times were very close.

SWI Prolog

?- time(riddle_n(100)).
% 7,208,201 inferences, 0.219 CPU in 0.578 seconds (38% CPU, 32951776 Lips)
true 


Shen Prolog

(6-) (time (do (prolog? (riddle_n 100)) (inferences)))

run time: 0.265625 secs
3354202

To run this problem I had to set (prolog-memory 1e5).

Its interesting that LIPS are counted differently in these two Prologs.  

Mark




dr.mt...@gmail.com

unread,
Aug 25, 2023, 1:46:41 PM8/25/23
to Shen
I should also add that Shen Prolog is running with an occurs check on this problem whereas SWI is not.

M.

Reply all
Reply to author
Forward
0 new messages