÷

 Step 1 : Are the Prolog SWI programs faster? At a glance.

This chart shows 3 comparisons - Time-used, Memory-used and Code-used.

Each chart bar shows, for one unidentified benchmark, how much the fastest Prolog SWI program used compared to the fastest Perl program.


 Step 2 : Are the Prolog SWI programs faster? Approximately.

This table shows 3 comparisons - Time-used, Memory-used and Code-used.

Each table row shows, for one named benchmark, how much the fastest Prolog SWI program used compared to the fastest Perl program.

 Prolog SWI used what fraction? used how many times more? 
Benchmark Time Memory Code Reduced N
 recursive1/31/3
 binary-trees±1/2± 14
 pidigits±±
 spectral-norm±
 fasta±±
 mandelbrot
 n-body±±
 nsieve±
 partial-sums
 fannkuch 10
 nsieve-bits10× 9
 sum-file11×
 k-nucleotide26×± 10,000

± read the measurements and then read the program source code.

 Step 3 : Are the Prolog SWI programs faster? Measurements.

This table shows 5 measurements - CPU Time, Elapsed Time, Memory, Code and ~ CPU Load.

For each named benchmark, measurements of the fastest Prolog SWI program are shown for comparison against measurements of the fastest Perl program.

Program Source Code CPU secs Elapsed secs Memory KB Code B ~ CPU Load
 recursive 
Prolog SWI342.833,320587  
Perl898.7810,836380  
 binary-trees N = 14 reduced workload 
Prolog SWI31.115,280790  
Perl41.7613,128541  
 pidigits 
Prolog SWI3.042,668618  
Perl3.612,532385  
 spectral-norm 
Prolog SWI7,664.572,968939  
Perl4,089.082,468334  
 fasta 
Prolog SWI1,871.952,5841369  
Perl950.041,872934  
 mandelbrot 
Prolog SWI853.152,608823  
Perl403.201,724311  
 n-body 
Prolog SWI4,662.822,4881573  
Perl1,697.591,9361140  
 nsieve 
Prolog SWI78.34159,052509  
Perl25.45121,904290  
 partial-sums 
Prolog SWI54.612,528735  
Perl17.411,476389  
 fannkuch N = 10 reduced workload 
Prolog SWI271.272,520788  
Perl66.201,496348  
 nsieve-bits N = 9 reduced workload 
Prolog SWI248.195,896673  
Perl24.212,132253  
 sum-file 
Prolog SWI208.022,740223  
Perl18.171,46884  
 k-nucleotide N = 10,000 reduced workload 
Prolog SWI14.938,6761284  
Perl0.568,060359  
 chameneos-redux
   No program
 regex-dna
   No program
 reverse-complement
   No program

 Measurements for all the accepted programs

 Prolog SWI : goal-oriented pattern-matching rules and facts 

SWI-Prolog version 5.6.19 for i686-linux

Online book: Learn Prolog Now!

Online book: Logic, Programming and Prolog

Home Page: http://www.swi-prolog.org/

Download: http://www.swi-prolog.org/dl-stable.html

Revised BSD license