Skip to content
README.rst 1.02 KiB
Newer Older
nimrod's avatar
nimrod committed
The prime benchmark
===================

nimrod's avatar
nimrod committed
Benchmarking programming languages by running program to find the first X prime
nimrod's avatar
nimrod committed
numbers. The algorithm is naive and should be implemented the same regardless of
the language.

Added languages
---------------

- C
- Lua
- PHP
- Python3
- Clojure
nimrod's avatar
nimrod committed

Usage
-----
nimrod's avatar
nimrod committed

nimrod's avatar
nimrod committed

    make

nimrod's avatar
nimrod committed

nimrod's avatar
nimrod committed

    make clean

nimrod's avatar
nimrod committed

nimrod's avatar
nimrod committed

    make test

nimrod's avatar
nimrod committed
Also, Docker and Docker Compose are supported (so just run
:code:`docker-compose up`).
nimrod's avatar
nimrod committed

History
-------

nimrod's avatar
nimrod committed
When starting to learn Lua, I wrote a simple program to exercise the table data
nimrod's avatar
nimrod committed
structure. But I had difficulties expressing what I wanted so I first wrote the
program in Python. After I had the program written in both languages I did the
obvious thing, I timed them. From there on Barak implemented the program in PHP
and we implemented it in C. We hope to have many more languages tested.
nimrod's avatar
nimrod committed

License
-------

This software is licensed under the BSD 3-clause license (see the
:code:`LICENSE.txt` file).