https://github.com/abc3/elixir_rust
Comparison of an echo command through erlang port and rustler
https://github.com/abc3/elixir_rust
elixir rustler
Last synced: 3 months ago
JSON representation
Comparison of an echo command through erlang port and rustler
- Host: GitHub
- URL: https://github.com/abc3/elixir_rust
- Owner: abc3
- Created: 2022-12-27T11:46:19.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-03-31T10:19:44.000Z (about 1 year ago)
- Last Synced: 2025-01-11T20:44:23.941Z (5 months ago)
- Topics: elixir, rustler
- Language: Elixir
- Homepage:
- Size: 8.79 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Benchmark of echo functions from erlang port and nif via the [rustler](https://github.com/rusterlium/rustler) lib
```
$ make init && make bench
mix run bench/echo.exs
Operating System: macOS
CPU Information: Apple M1 Pro
Number of Available Cores: 10
Available memory: 16 GB
Elixir 1.14.0
Erlang 25.0.3Benchmark suite executing with the following configuration:
warmup: 2 s
time: 5 s
memory time: 0 ns
reduction time: 0 ns
parallel: 1
inputs: none specified
Estimated total run time: 14 sBenchmarking port echo ...
Benchmarking rustler echo ...Name ips average deviation median 99th %
rustler echo 1.37 M 0.73 μs ±2009.59% 0.71 μs 0.83 μs
port echo 0.136 M 7.34 μs ±58.42% 6.92 μs 11.92 μsComparison:
rustler echo 1.37 M
port echo 0.136 M - 10.08x slower +6.61 μs
```