Go to file
Dan Ballard 29aa468cf4 updated python to python 3; added clang c compiler; added Dart; added run params to results.txt 2023-05-02 18:27:00 -05:00
src initial import of 1.02 2011-03-07 23:01:27 -08:00
ChangeLog initial import of 1.02 2011-03-07 23:01:27 -08:00
Makefile updated python to python 3; added clang c compiler; added Dart; added run params to results.txt 2023-05-02 18:27:00 -05:00
README updated python to python 3; added clang c compiler; added Dart; added run params to results.txt 2023-05-02 18:27:00 -05:00
autoTest.pl updated python to python 3; added clang c compiler; added Dart; added run params to results.txt 2023-05-02 18:27:00 -05:00
languages initial import of 1.02 2011-03-07 23:01:27 -08:00
primes.4.lua initial import of 1.02 2011-03-07 23:01:27 -08:00
primes.5.lua initial import of 1.02 2011-03-07 23:01:27 -08:00
primes.5c initial import of 1.02 2011-03-07 23:01:27 -08:00
primes.adb initial import of 1.02 2011-03-07 23:01:27 -08:00
primes.alt.c initial import of 1.02 2011-03-07 23:01:27 -08:00
primes.alt2.c initial import of 1.02 2011-03-07 23:01:27 -08:00
primes.alt3.c initial import of 1.02 2011-03-07 23:01:27 -08:00
primes.awk initial import of 1.02 2011-03-07 23:01:27 -08:00
primes.c initial import of 1.02 2011-03-07 23:01:27 -08:00
primes.cbl initial import of 1.02 2011-03-07 23:01:27 -08:00
primes.cpp initial import of 1.02 2011-03-07 23:01:27 -08:00
primes.cs initial import of 1.02 2011-03-07 23:01:27 -08:00
primes.dart updated python to python 3; added clang c compiler; added Dart; added run params to results.txt 2023-05-02 18:27:00 -05:00
primes.e initial import of 1.02 2011-03-07 23:01:27 -08:00
primes.erl initial import of 1.02 2011-03-07 23:01:27 -08:00
primes.f ported from g77 to gfortran 2013-01-30 22:37:55 -08:00
primes.fasl initial import of 1.02 2011-03-07 23:01:27 -08:00
primes.fe initial import of 1.02 2011-03-07 23:01:27 -08:00
primes.fs initial import of 1.02 2011-03-07 23:01:27 -08:00
primes.go add rust!; make go not 'cheat' with array based method and print each number (save array base impl tho); update autotest wrt Ruby, now all common ruby is 2+ 2020-06-28 11:11:30 -07:00
primes.go.array add rust!; make go not 'cheat' with array based method and print each number (save array base impl tho); update autotest wrt Ruby, now all common ruby is 2+ 2020-06-28 11:11:30 -07:00
primes.hs update haskell code for new haskel 2010 library standard 2013-01-30 22:13:37 -08:00
primes.html initial import of 1.02 2011-03-07 23:01:27 -08:00
primes.java initial import of 1.02 2011-03-07 23:01:27 -08:00
primes.lisp initial import of 1.02 2011-03-07 23:01:27 -08:00
primes.m fixed for newer gcc objective c syntax/compile blah 2013-01-30 22:05:22 -08:00
primes.m4 initial import of 1.02 2011-03-07 23:01:27 -08:00
primes.ml initial import of 1.02 2011-03-07 23:01:27 -08:00
primes.pas initial import of 1.02 2011-03-07 23:01:27 -08:00
primes.perl.pl initial import of 1.02 2011-03-07 23:01:27 -08:00
primes.php initial import of 1.02 2011-03-07 23:01:27 -08:00
primes.pike initial import of 1.02 2011-03-07 23:01:27 -08:00
primes.prolog.pl initial import of 1.02 2011-03-07 23:01:27 -08:00
primes.py updated python to python 3; added clang c compiler; added Dart; added run params to results.txt 2023-05-02 18:27:00 -05:00
primes.r initial import of 1.02 2011-03-07 23:01:27 -08:00
primes.rb initial import of 1.02 2011-03-07 23:01:27 -08:00
primes.rexx initial import of 1.02 2011-03-07 23:01:27 -08:00
primes.rs add rust!; make go not 'cheat' with array based method and print each number (save array base impl tho); update autotest wrt Ruby, now all common ruby is 2+ 2020-06-28 11:11:30 -07:00
primes.scala added scala support 2013-02-23 09:36:15 -08:00
primes.scm initial import of 1.02 2011-03-07 23:01:27 -08:00
primes.sh initial import of 1.02 2011-03-07 23:01:27 -08:00
primes.sieve.c initial import of 1.02 2011-03-07 23:01:27 -08:00
primes.sml initial import of 1.02 2011-03-07 23:01:27 -08:00
primes.st initial import of 1.02 2011-03-07 23:01:27 -08:00
primes.tcl initial import of 1.02 2011-03-07 23:01:27 -08:00
primes.vb initial import of 1.02 2011-03-07 23:01:27 -08:00
primes.x86.s initial import of 1.02 2011-03-07 23:01:27 -08:00
primes_prolog.pl initial import of 1.02 2011-03-07 23:01:27 -08:00

README

https://danballard.com/projects/primes/
dan@mindstab.net

Mindstab.net Multi language prime number project:
  Prime number finders in ~40 languages
  and a test driver

2023: added dart. updateed python to python3. Added run params to results.txt

2020: added rust. Tweak ruby support for newer interpreter

2014: added go

2013: Cleanedup and small additions
Cleaned up code to work with newer versions of compilers and interpreters and added a few new languages

2011: Re-release
This project is still a terrible blunt way to see how different languages/implementation perform and compare at basic arithmatic and looping and crudly look at speed.  And it's a small roseta stone too.  Autotest.pl drives it all and it's appaling speghetti code I wrote half a decade ago and I probably still knew better.  I've made a few quick updates since 1.01 from 2006 to make it run on Ubuntu 10.04 which is what I'm running.  Your milage may vary, but it's on github now, so feel free to offer suggestions in code.

2004-2006
With this project I want to implement prime number finders in as many languages as I can.  It's pretty much a way for me to learn a littlebit about a lot of languages.  This project also comes with a test program (autoTest.pl) which can run and benchmark all the languages so I can see their various performances (part of learning about the languages).