Skip to content

Repo para guardar scripts para hacer benchmarks a los lenguajes de programación mas populares

License

Notifications You must be signed in to change notification settings

elbertcastaneda/benchmarks_scripts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 

Repository files navigation

benchmarks_scripts

Repo para guardar scripts para hacer benchmarks a los lenguajes de programación mas populares

Les dejo los resultados en mi maquina(MacBook Pro (Retina, 15-inch, Mid 2014), con 16GB de RAM, macOS Mojave 10.14):


  • PHP 7.2.11 (cli) (built: Oct 11 2018 16:23:09) ( NTS )
php benchmark.php
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Execution time: 19

  • Python 2.7.15
python2.7 benchmark.py
('Found', 664579, 'prime numbers.')
('Found', 664579, 'prime numbers.')
('Found', 664579, 'prime numbers.')
('Found', 664579, 'prime numbers.')
('Found', 664579, 'prime numbers.')
('Found', 664579, 'prime numbers.')
('Found', 664579, 'prime numbers.')
('Found', 664579, 'prime numbers.')
('Found', 664579, 'prime numbers.')
('Found', 664579, 'prime numbers.')
('Execution time:', 20.122681140899658)

  • Python 3.7.0
python3.7 benchmark.py
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Execution time: 19.33597683906555

  • C++, Apple LLVM version 10.0.0 (clang-1000.11.45.2)
g++ benchmark.cpp -o benchmark && ./benchmark && rm -Rf ./benchmark
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Execution time: 2.08 seconds.

  • NodeJS, v8.11.4
node benchmark.js
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Execution time: 2.333

  • NodeJS, v11.4.0
node benchmark.js
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Execution time: 1.769

  • NodeJS, v18.17.1
node benchmark.js
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Execution time: 1.399

  • Bun: v1.0.14
bun run benchmarkjs
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Execution time: 1.441

  • Java(TM) SE Runtime Environment (build 1.8.0_111-b14)
javac benchmark.java && java -classpath ./ PrimeNumbersBenchmarkApp && rm -Rf *.class
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Execution time: 3.316000.

  • kotlinc-jvm 2.0.0 (JRE 21.0.3+7-LTS-152)
kotlinc benchmark.kt -include-runtime -d PrimeNumbersBenchmarkApp.jar && java -jar PrimeNumbersBenchmarkApp.jar && rm -f PrimeNumbersBenchmarkApp.jar
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Execution time: 2.608 seconds.

  • Welcome to Scala 3.4.2 (21.0.3, Java Java HotSpot(TM) 64-Bit Server VM).
scalac benchmark.scala && scala PrimeNumbersBenchmarkApp && rm -Rf *.class *.tasty

Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Execution time: 3.18 seconds.

  • ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-darwin18]
ruby benchmark.rb
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Execution time: 12.201945.

  • ruby 3.3.2 (2024-05-30 revision e5a195edf6) [x86_64-linux]
ruby benchmark.rb
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Execution time: 7.974534324.

  • jruby 9.4.7.0 (3.1.4) 2024-04-29 597ff08ac1 Java HotSpot(TM) 64-Bit Server VM 21.0.3+7-LTS-152 on 21.0.3+7-LTS-152 +jit [x86_64-linux]
jruby benchmark.rb
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Execution time: 13.306539.

  • go version go1.11.1 darwin/amd64
go run benchmark.go
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Execution time:  0.964141594

  • dart version 2.1.0 (Tue Nov 13 18:22:02 2018 +0100) on "macos_x64"
dart benchmark.dart
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Execution time: 2.122

  • dotnet version 2.2.105 (Commit: 7cecb35b92, C#: 7.3) on "macos_x64"
dotnet tool install -g dotnet-script
dotnet script benchmark.cs
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Execution time: 1.299

  • Vala 0.44.4 on "macos_x64"
# export PKG_CONFIG_PATH="${PKG_CONFIG_PATH}:/usr/local/opt/libffi/lib/pkgconfig"
valac --pkg gee-0.8 benchmark.vala && ./benchmark  && rm ./benchmark

Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Execution time: 2.342681.

  • rustc 1.74.0-nightly (b4e54c6e3 2023-09-11)
rustc ./benchmark.rs && ./benchmark && rm -Rf ./benchmark
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Found 664579 prime numbers.
Execution time: 2.278723654s

  • Apple clang version 15.0.0 (clang-1500.0.40.1)
gcc -o benchmark benchmark.c && ./benchmark && rm -Rf ./benchmark
Found 664579 prime numbers (withFixedEstimation).
Found 664579 prime numbers (withFixedEstimation).
Found 664579 prime numbers (withFixedEstimation).
Found 664579 prime numbers (withFixedEstimation).
Found 664579 prime numbers (withFixedEstimation).
Found 664579 prime numbers (withFixedEstimation).
Found 664579 prime numbers (withFixedEstimation).
Found 664579 prime numbers (withFixedEstimation).
Found 664579 prime numbers (withFixedEstimation).
Found 664579 prime numbers (withFixedEstimation).
Execution time: 0.69 seconds (withFixedEstimation).


---

Found 664579 prime numbers (withManualEstimation).
Found 664579 prime numbers (withManualEstimation).
Found 664579 prime numbers (withManualEstimation).
Found 664579 prime numbers (withManualEstimation).
Found 664579 prime numbers (withManualEstimation).
Found 664579 prime numbers (withManualEstimation).
Found 664579 prime numbers (withManualEstimation).
Found 664579 prime numbers (withManualEstimation).
Found 664579 prime numbers (withManualEstimation).
Found 664579 prime numbers (withManualEstimation).
Execution time: 0.67 seconds (withManualEstimation).

  • gcc-13 (Homebrew GCC 13.2.0) 13.2.0
gcc-13 -o benchmark benchmark.c && ./benchmark && rm -Rf ./benchmark
Found 664579 prime numbers (withFixedEstimation).
Found 664579 prime numbers (withFixedEstimation).
Found 664579 prime numbers (withFixedEstimation).
Found 664579 prime numbers (withFixedEstimation).
Found 664579 prime numbers (withFixedEstimation).
Found 664579 prime numbers (withFixedEstimation).
Found 664579 prime numbers (withFixedEstimation).
Found 664579 prime numbers (withFixedEstimation).
Found 664579 prime numbers (withFixedEstimation).
Found 664579 prime numbers (withFixedEstimation).
Execution time: 0.74 seconds (withFixedEstimation).


---

Found 664579 prime numbers (withManualEstimation).
Found 664579 prime numbers (withManualEstimation).
Found 664579 prime numbers (withManualEstimation).
Found 664579 prime numbers (withManualEstimation).
Found 664579 prime numbers (withManualEstimation).
Found 664579 prime numbers (withManualEstimation).
Found 664579 prime numbers (withManualEstimation).
Found 664579 prime numbers (withManualEstimation).
Found 664579 prime numbers (withManualEstimation).
Found 664579 prime numbers (withManualEstimation).
Execution time: 0.70 seconds (withManualEstimation).

About

Repo para guardar scripts para hacer benchmarks a los lenguajes de programación mas populares

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published