View Code? Open in Web Editor
NEW
Benchmarks for various languages
License: MIT License
Python 32.32%
C 2.28%
C++ 3.67%
Rust 2.51%
Shell 2.43%
C# 6.47%
Haskell 3.53%
Java 5.72%
JavaScript 2.84%
PHP 4.54%
Ruby 3.63%
TypeScript 1.93%
Fortran 4.92%
COBOL 11.61%
Go 3.11%
V 2.21%
Kotlin 2.61%
Common Lisp 3.68%
bench's Introduction
benchmarks for various languages
- install deps
- then run
python3 runner.py <passes>
where passes is how many times to run each test (we reccommend 10)
"oh, but there is a faster <language> compiler"
- we deliberately chose the most common tool for each language
- as this is the one most devs would use
- any language can be pushed to its limits like this, that is not the point of this project
"where are the optimisation flags?"
- we chose to exclude them, for the reasons outlined above
- if you want to add a language (or script), see
CONTRIBUTING.md
- SBCL, for ANSI Common Lisp
language |
Hello, World! |
default sorting algorithm |
fibonacci (15th term) |
c |
✅ |
❌ |
✅ |
c# |
✅ |
✅ |
✅ |
cobol |
✅ |
❌ |
✅ |
c++ |
✅ |
✅ |
✅ |
fortan |
✅ |
❌ |
✅ |
go |
✅ |
✅ |
✅ |
haskell |
✅ |
✅ |
✅ |
java |
✅ |
✅ |
✅ |
javascript |
✅ |
✅ |
✅ |
kotlin |
✅ |
✅ |
✅ |
common lisp |
✅ |
✅ |
✅ |
php |
✅ |
✅ |
✅ |
python |
✅ |
✅ |
✅ |
ruby |
✅ |
✅ |
✅ |
rust |
✅ |
✅ |
✅ |
typescript |
✅ |
✅ |
✅ |
v |
✅ |
✅ |
✅ |
- ✅ -- done
- ❌ -- not available in language (example default sorter in C)
bench's People
Contributors
Stargazers
Watchers