Benchmark to compare async web server + interpreter + web client implementations across various languages
See the codeBenchmark the same async program across Rust, OCaml, and F#.
These days, it's mostly used to benchmark F# in various different configurations.
This is a benchmark to test what's the best language for implementing Dark in. Dark already has an implementation, but we are looking for improvements, especially around async.
The benchmark is fizzbuzz: using an interpreter connected to web server, dynamically calculate fizzbuzz and return it as a JSON response. This is to test the raw speed of the HTTP server and interpreter.
The most important metric is requests/second.
No-one likes to see their favorite language lose at benchmarks, so please feel free to submit pull requests to improve existing benchmarks, or add new variations (different web servers, new languages/frameworks, etc). Some rules:
The benchmark is implemented in measure.py. Requires wrk to be installed.
Run ./measure to test all the fizzbuzz implementations, or
./measure <directory_name1> <directory_name2> <etc> to test a subset
of them.
Each benchmark candidate is in its own directory, which has some known files:
./install.sh - installs dependencies./build.sh - builds the server. This should use release configuration./run.sh - runs the server on port 5000BROKEN - if this file exists, skip the implementation in this directoryBenchmarks implement a HTTP server connected to an interpreter which each implement a simple subset of the dark language.
The purpose of the benchmark is to establish:
The sync implementation helps us figure out a baseline for the performance. We can then compare the sync and async implementation on fizzbuzz to see how much async costs.
Different languages can be compared async-vs-async for (which is raw performance given fizzbuzz constraints).
The optimized async implementation is to see the value of different optimizations and see if there are ways to optimize above a baseline async implementation.
Recent results are posted to the Result issue
Dark's community is held to the Dark Code of Conduct. Benchmarks can be contentious, please be kind to all people involved.
MIT
F#
70.9%
Rust
14.0%
OCaml
7.4%
C#
4.2%
Shell
2.0%
Python
1.6%
Benchmark to compare async web server + interpreter + web client implementations across various languages
See the codeBenchmark the same async program across Rust, OCaml, and F#.
These days, it's mostly used to benchmark F# in various different configurations.
This is a benchmark to test what's the best language for implementing Dark in. Dark already has an implementation, but we are looking for improvements, especially around async.
The benchmark is fizzbuzz: using an interpreter connected to web server, dynamically calculate fizzbuzz and return it as a JSON response. This is to test the raw speed of the HTTP server and interpreter.
The most important metric is requests/second.
No-one likes to see their favorite language lose at benchmarks, so please feel free to submit pull requests to improve existing benchmarks, or add new variations (different web servers, new languages/frameworks, etc). Some rules:
The benchmark is implemented in measure.py. Requires wrk to be installed.
Run ./measure to test all the fizzbuzz implementations, or
./measure <directory_name1> <directory_name2> <etc> to test a subset
of them.
Each benchmark candidate is in its own directory, which has some known files:
./install.sh - installs dependencies./build.sh - builds the server. This should use release configuration./run.sh - runs the server on port 5000BROKEN - if this file exists, skip the implementation in this directoryBenchmarks implement a HTTP server connected to an interpreter which each implement a simple subset of the dark language.
The purpose of the benchmark is to establish:
The sync implementation helps us figure out a baseline for the performance. We can then compare the sync and async implementation on fizzbuzz to see how much async costs.
Different languages can be compared async-vs-async for (which is raw performance given fizzbuzz constraints).
The optimized async implementation is to see the value of different optimizations and see if there are ways to optimize above a baseline async implementation.
Recent results are posted to the Result issue
Dark's community is held to the Dark Code of Conduct. Benchmarks can be contentious, please be kind to all people involved.
MIT
F#
70.9%
Rust
14.0%
OCaml
7.4%
C#
4.2%
Shell
2.0%
Python
1.6%