Skip to content

Latest commit

 

History

History
147 lines (115 loc) · 2.28 KB

README.md

File metadata and controls

147 lines (115 loc) · 2.28 KB

About

Testing the performance of some languages and enviroments using the Sieve of Eratosthenes algorithm

Results

Ranking summary

Position Language Version Medium Lowest Highest
1 Rust 1.75.0 0.271s 0.263s 0.278s
2 Zig 0.11.0 0.275s 0.273s 0.280s
3 Go 1.21.6 0.331s 0.298s 0.331s
4 .Net C# 8.0.101 0.333s 0.322s 0.349s
5 Bun 1.0.14 0.884s 0.874s 0.891s
6 Python 3.11.6 4.5s 4.390s 4.601s
7 Node 20.11.0 6.593s 6.559s 6.651s
8 Deno 1.40.3 N/A N/A N/A

Commands

Build
cargo build --release
Run
time ./target/release/rust

Result

  • 0.271s
  • 0.263s
  • 0.278s

Medium: 0.271s

Commands

Build
go build -ldflags="-s -w" ./main.go
Run
time ./main

Result

  • 0.304s
  • 0.331s
  • 0.298s

Medium: 0.331s

Commands

Build
zig build -Doptimize=ReleaseFast
Run
time ./zig-out/bin/zig

Result

  • 0.273s
  • 0.273s
  • 0.280s

Medium: 0.275s

Commands

Run
time python main.py

Result

  • 4.390s
  • 4.509s
  • 4.601s

Medium: 4.5s

Commands

Run
time node main.js

Result

  • 6.559s
  • 6.569s
  • 6.651s

Medium: 6.593s

Commands

Run
time deno run main.js

Result

Could not be tested

Commands

Run
time bun run main.js

Result

  • 0.874s
  • 0.887s
  • 0.891s

Medium: 0.884s

Commands

Build
dotnet build --configuration Release
Run
time ./bin/Release/net8.0/dotnet

Result

  • 0.349s
  • 0.322s
  • 0.328s

Medium: 0.333s