Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Benchmark finding the first 2^16 prime numbers in a dozen languages

Erlang Python C Java Shell
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
Makefile Make "dist" work completely with git tree
README Add link to github page to benchmark.html



This package contains the same algorithm implemented in different
languages, such as Ada, awk, (i386) Assembly, Erlang, Java, Perl,
and Python.

The algorithm is not very sophisticated, but can be quite fast.


src/lll            source code for language lll
testcases/   test case definitions
build/xxx          built code for test case xxx
results/xxx.*      benchmark results for test case xxx
results/ benchmark report for test case xxx

Test cases

The file name for test case xxx is "".

The first line contains a description.
The second line contains the language lll as in src/lll/.
The following lines contain variable definitions for building in the
form of "VARIABLE=value" or "export VARIABLE=value", suitable for
inclusion into a Makefile.

How to build the test cases


	make build

to build all test cases.
The build results will be stored in build/.

How to run the benchmarks


	make benchmark

to run the benchmarks.

The benchmark results will be stored in results/.

You can create an HTML file with a summary by running

	make benchmark.html

The resulting file created on my system is available from

Version Control

Migrated to git from arch (tla).


  * Have programs accept number of primes to calculate on command line.
      - ada
      - asm
      - awk
      - bash
      - c
      - erlang
      - java
      - perl
      - php
      - python
      - python-array
      - python-array-append
      - ruby
  * Test different programs for different number of primes to calculate.
  * Print diagram of program/numberofprimes/runtime.
Something went wrong with that request. Please try again.