We have used a set of ten small logic programming benchmarks to compare the performance of Mercury to the performance of other logic programming systems. Since the syntax of Mercury is quite close to the syntax of Prolog, we have only one version of each benchmark, which is put through the C preprocessor, with a set of definitions depending on the system being tested. This is how we enable the declarations appropriate for Mercury, Aquarius Prolog, SICStus Prolog or NU-Prolog.
The benchmarks were run on a Sun SPARCserver 1000 with four 50 MHz TI SuperSPARC processors and 256 megabytes of memory running SunOS 5.3 (Solaris 2.3). Each processor is rated at 60.3 SPECint92, and has a 4-way associative 16 Kb I-cache and a 5-way associative 20 Kb D-cache, backed by 1 Mb of unified secondary cache.
The tested systems are SWI-Prolog 1.9.0, NU-Prolog 1.6.4, wamcc 2.21, Quintus Prolog 3.2, SICStus Prolog 2.1, Aquarius Prolog 1.0 and Mercury 0.5-beta.
This list contains links to the sources of the benchmarks:
The benchmarks use the following test harness:
The benchmark results are available here in three forms:
This list contains links to the C files generated by the Mercury compiler for the benchmarks: