# Performance differences?

**URL:** <https://swi-prolog.discourse.group/t/performance-differences/1170>\
**Category:** General\
**Created:** [September 5, 2019, 1:40am UTC](https://swi-prolog.discourse.group/t/performance-differences/1170 "2019-09-05T01:40:23Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![abaljeu](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/abaljeu/32/136_2.png) [@abaljeu](https://swi-prolog.discourse.group/u/abaljeu)\
**Post date:** [September 5, 2019, 1:40am UTC](https://swi-prolog.discourse.group/t/performance-differences/1170/1 "2019-09-05T01:40:23Z")

</div>

I’m tracking down the source of a major performance degradation in my program, one part of which is SWI-Prolog. Lots of things have changed recently so it’s hard to pin.

Is there any reason to suspect changing from 8.1.3 to 8.1.13? Not saying there is, just checking all angles.

---

<div class="post-metadata">

**Author:** ![jan](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/jan/32/4_2.png) [@jan](https://swi-prolog.discourse.group/u/jan)\
**Post date:** [September 5, 2019, 7:17am UTC](https://swi-prolog.discourse.group/t/performance-differences/1170/2 "2019-09-05T07:17:40Z")

</div>

Without any hint where the performance degradation is this is hard to tell. Overall, over time, performance on specific programs may drop a few percent (say \< 10), while others may get much faster. Anything else is a bug. I do not recall changes that should explain more than tiny slowdowns. It depends a little on the versions though. Changes to stack growing/GC scheduling have caused problems and the same is true for scheduling clause GC. Both are fixed (well, on the programs they showed up). I’d give 8.1.13 a try. I think practically the only incompatibility is a more uniform and stricter implementation of the command line arguments.

Otherwise, comparing a profile/1 run is the easiest way to get a clue.

---

<div class="post-metadata">

**Author:** ![abaljeu](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/abaljeu/32/136_2.png) [@abaljeu](https://swi-prolog.discourse.group/u/abaljeu)\
**Post date:** [September 5, 2019, 5:52pm UTC](https://swi-prolog.discourse.group/t/performance-differences/1170/3 "2019-09-05T17:52:16Z")

</div>

Tested, there seems to be virtually the same profile. Thanks.

---

<div class="post-metadata">

**Author:** ![jan](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/jan/32/4_2.png) [@jan](https://swi-prolog.discourse.group/u/jan)\
**Post date:** [September 5, 2019, 6:53pm UTC](https://swi-prolog.discourse.group/t/performance-differences/1170/4 "2019-09-05T18:53:46Z")

</div>

?? Between what and what? You say you experience a slow-down. That implies the profile output should differ, no? One should hope this points at some predicate or garbage collection being the culprit.

---

<div class="post-metadata">

**Author:** ![abaljeu](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/abaljeu/32/136_2.png) [@abaljeu](https://swi-prolog.discourse.group/u/abaljeu)\
**Post date:** [September 5, 2019, 7:06pm UTC](https://swi-prolog.discourse.group/t/performance-differences/1170/5 "2019-09-05T19:06:21Z")

</div>

Read the start. The overall program, of which SWI is one fraction, is slower. Tests show SWI performance is not changed.

Alan Baljeu

---

<div class="post-metadata">

**Author:** ![jan](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/jan/32/4_2.png) [@jan](https://swi-prolog.discourse.group/u/jan)\
**Post date:** [September 5, 2019, 7:21pm UTC](https://swi-prolog.discourse.group/t/performance-differences/1170/6 "2019-09-05T19:21:58Z")

</div>

Ok. So, SWI-Prolog wise this is false alarm. Success finding the cause!
