Subject: Re: [SWIPL] integrating YAP/GNUP binaries with SWI Date: Sunday 26 October 2003 10:04 From: Jan Wielemaker To: David Reitter , Jan Wielemaker , SWI-Prolog list Dave, > thanks for your hints. > > > Did you use the profiler? If there are clear hotspots you may consider > > rewriting them in C (after a close inspection of the Prolog code for > > optimisations :-). > > The profiler was pretty helpful, and I also rewrote some stuff in C, but it > turned out that the native version of small pieces of code (which get called > frequently) is only marginally faster. SWI is doing a good job here. A lot > of my stuff is based on the unification of large feature structures, and I > am using prolog's unification mainly. Usually, they succeed (where they may > fail, I have implemented some fail-fast algorithm). Also, there is a bit of > backtracking involved, and I hope that the compiled version will be faster > in these areas. (As said before, I can only compile the kernel, as other I think I've got bad news for you. An interesting piece of software is the peirera benchmark suite for Prolog. It isn't very realistic, but it contains a 34 tests that all try to analyse only one particular aspect of Prolog performance. With all 34 tests normalised to 1 second `SWI-Prolog CPU time (not optimised)' yap is overall a little over twice as fast. Studying the tests in detail, it is mostly calling predicates that is a lot faster in yap (upto 8 times). Unification of large terms is roughly equal (yap beats SWI by 20%). SWI is 5 times faster asserting facts. Most of the test of the tests are a bit hard hard to interpret as the difference in calling overhead affects all the tests and some work should be done to correct the figures. On the other hand, the requirement to unify large terms where most unifications succeed hints to possibly poor design of the datastructures. Maybe you can try to describe the problem and design you used. There are some really smart and experienced people on this mailinglist! > parts of the project use libraries such as http, and the database. SWI-pl is > doing an excellent job at speeding up development!) Thats where it is designed for :-) --- Jan ---------------- * To UNSUBSCRIBE, please use the HTML form at http://www.swi-prolog.org/mailinglist.html or send mail to prolog-request@swi.psy.uva.nl using the Subject: "unsubscribe" (without the quotes) and *no* message body. ** An ARCHIVE of this list is maintained at http://www.swi.psy.uva.nl/projects/SWI-Prolog/mailinglist/archive/