Operating System: macOS
CPU Information: Intel(R) Core(TM) i5-1038NG7 CPU @ 2.00GHz
Number of Available Cores: 8
Available memory: 16 GB
Elixir 1.12.1
Erlang 24.0.1
Benchmark suite executing with the following configuration:
warmup: 2 s
time: 1.67 min
memory time: 1.67 min
parallel: 4
inputs: none specified
Estimated total run time: 3.37 min
Benchmarking ex_keccak...
Name ips average deviation median 99th %
ex_keccak 61.15 K 16.35 μs ±568.01% 11 μs 44 μs
Memory usage statistics:
Name Memory usage
ex_keccak 48 B
with OwnedBinary
Operating System: macOS
CPU Information: Intel(R) Core(TM) i5-1038NG7 CPU @ 2.00GHz
Number of Available Cores: 8
Available memory: 16 GB
Elixir 1.12.1
Erlang 24.0.1
Benchmark suite executing with the following configuration:
warmup: 2 s
time: 1.67 min
memory time: 1.67 min
parallel: 4
inputs: none specified
Estimated total run time: 3.37 min
Benchmarking ex_keccak...
Name ips average deviation median 99th %
ex_keccak 51.55 K 19.40 μs ±650.83% 20 μs 54 μs
Memory usage statistics:
Name Memory usage
ex_keccak 96 B
it seems with NewBinary the library performs better both in terms of memory and ips
use NewBinary instead of OwnedBinary (https://github.com/rusterlium/rustler/blob/master/CHANGELOG.md#0240---2021-02-24)
I did some benchmarks
with NewBinary
with OwnedBinary
it seems with
NewBinary
the library performs better both in terms of memory and ips