Did you know ... | Search Documentation: |
Janus performance evaluation |
Below is a table to give some feeling on the overhead of making calls between Prolog and Python. These figures are roughly the same as the figures for the XSB/Python interface. All benchmarks have been executed on AMD3950X running Ubuntu 22.04, SWI-Prolog 9.1.11 and Python 3.10.6.
Action | Time (seconds) |
Echo list with 1,000,000 elements | 0.12 |
Call Pyton demo:int() from Prolog 1,000,000
times | 0.44 |
Call Pyton demo:sumlist3(5,[1,2,3]) from Prolog
1,000,000 times | 1.4 |
Call Prolog Y is X+1 from Python 1,000,000 times | 1.9 |
Iterate from Python over Prolog goal between(1, 1 000 000,
X) | 1.1 |
Iterate over Python iterator range(1,1000000) from
Prolog | 0.17 |