# Performance improvements

**URL:** <https://swi-prolog.discourse.group/t/performance-improvements/9328>\
**Category:** General\
**Tags:** performance\
**Created:** [September 30, 2025, 3:55pm UTC](https://swi-prolog.discourse.group/t/performance-improvements/9328 "2025-09-30T15:55:23Z")\
**Posts on this page:** 1\
**Page:** 1

<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 30, 2025, 3:55pm UTC](https://swi-prolog.discourse.group/t/performance-improvements/9328/1 "2025-09-30T15:55:23Z")

</div>

As mentioned in [WASM performance](https://swi-prolog.discourse.group/t/wasm-performance/9320), some big steps have been made for the performance of the WASM version. These also improved the performance using GCC-15 on x86\_64. There is more good news: using `-O3` for GCC now boosts performance another 15%. In older tests `-O2` produced faster and smaller binaries. The standard benchmark is now **25% faster** (Fedora 42 on AMD3950X) than 2 days ago 🙂

That makes the gap with Clang really big. It turns out there was a mistake in the configuration why PGO optimization did not work. But, still Clang is not great. The best result comparing for Clang-20 is 25% slower than GCC-15 on Fedora on AMD3950X. For AppleClang (17) -O2 vs -O3 with or without PGO makes little difference. Still, SWI-Prolog performs about the same on M1 than on my AMD3950X desktop on single threaded workloads.
