Catalog · How the catalog works
test-speed
Speed comparison of programming languages.
- ★ 1 on GitHub
Anyone may press Interesting, signed in or not. It helps others find this project.
README
Programming languages speed compare
Project contains two simple tests to compare speed of different programming languages: Java, Python, Rust, Lazarus/Delphi.
Two test implemented:
- Search all knight's tours (brute-force algorithm)
- Print prime numbers (naive algorithm)
How to run
Clone project with demos:
git clone https://github.com/SazonovDenis/test-speed.git
cd test-speedCompile and run for each language (appropriate compiler needed):
Java
Knight's tour
cd java/src
javac Horse.java
java Horse 3 4 7Prime numbers
cd java/src
javac Primes.java
java Primes 3 5Rust
Knight's tour
cd rust/src
rustc -C opt-level=3 -C debuginfo=0 -C overflow-checks=off main_horse.rs
main_horse.exe 3 4 7Prime numbers
cd rust/src
rustc -C opt-level=3 -C debuginfo=0 -C overflow-checks=off main_primes.rs
main_primes.exe 3 5Python
Knight's tour
cd python
python horse.py 3 4 7Prime numbers
cd python
python primes.py 3 5Lazarus
Knight's tour
cd lazarus
fpc -B -OWall -CX -XX -Xs- -al -FWmain_horse.wpo main_horse.lpr
main_horse.exe 3 4 7Prime numbers
cd lazarus
fpc -B -OWall -CX -XX -Xs- -al -FWmain_primes.wpo main_primes.lpr
main_primes.exe 3 5Delphi 7
Knight's tour
cd lazarus
dcc32 /b -Drelease horse.dpr
horse.exe 3 4 7Prime numbers
cd lazarus
dcc32 /b -Drelease primes.dpr
primes.exe 3 5Run parameters explanation
Knight's tour
horse.exe <attempts count> <board size x> <board size y>Prime numbers
primes.exe <attempts count> <prime number count for one attempt>
