Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add types decoding benchmark #75

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

add types decoding benchmark #75

wants to merge 1 commit into from

Conversation

ruslandoga
Copy link
Contributor

@ruslandoga ruslandoga commented Apr 24, 2023

  • compare with nimble_parsec approach

@ruslandoga
Copy link
Contributor Author

$ MIX_ENV=bench mix run bench/types.exs
Operating System: macOS
CPU Information: Apple M1
Number of Available Cores: 8
Available memory: 8 GB
Elixir 1.14.4
Erlang 25.3

Benchmark suite executing with the following configuration:
warmup: 2 s
time: 5 s
memory time: 0 ns
reduction time: 0 ns
parallel: 1
inputs: Array(String), Array(Tuple(String, UInt64)), DateTime, DateTime('UTC'), String
Estimated total run time: 35 s

Benchmarking decode/1 with input Array(String) ...
Benchmarking decode/1 with input Array(Tuple(String, UInt64)) ...
Benchmarking decode/1 with input DateTime ...
Benchmarking decode/1 with input DateTime('UTC') ...
Benchmarking decode/1 with input String ...

##### With input Array(String) #####
Name               ips        average  deviation         median         99th %
decode/1        4.99 M      200.34 ns ±21470.55%         125 ns         167 ns

##### With input Array(Tuple(String, UInt64)) #####
Name               ips        average  deviation         median         99th %
decode/1        3.05 M      327.90 ns ±12217.14%         250 ns         333 ns

##### With input DateTime #####
Name               ips        average  deviation         median         99th %
decode/1       12.27 M       81.47 ns ±12881.17%          83 ns          84 ns

##### With input DateTime('UTC') #####
Name               ips        average  deviation         median         99th %
decode/1        2.76 M      362.60 ns ±10762.82%         291 ns         416 ns

##### With input String #####
Name               ips        average  deviation         median         99th %
decode/1       13.43 M       74.46 ns ±14164.24%          42 ns          84 ns

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant