Skip to content

improve naive datetime decoding#320

Open
ruslandoga wants to merge 5 commits into
masterfrom
improve-naive-decoding
Open

improve naive datetime decoding#320
ruslandoga wants to merge 5 commits into
masterfrom
improve-naive-decoding

Conversation

@ruslandoga
Copy link
Copy Markdown
Collaborator

Closes #319

Comment thread bench/naive_decode.exs
Benchee.run(%{
"via_unix" => fn -> Enum.each(1..1_000_000, &Bench.via_unix/1) end,
"via_gregorian" => fn -> Enum.each(1..1_000_000, &Bench.via_gregorian/1) end
})
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Operating System: macOS
CPU Information: Apple M2
Number of Available Cores: 8
Available memory: 8 GB
Elixir 1.19.5
Erlang 28.3
JIT enabled: true

Benchmark 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 s
Excluding outliers: false

Benchmarking via_gregorian ...
Benchmarking via_unix ...
Calculating statistics...
Formatting results...

Name                    ips        average  deviation         median         99th %
via_gregorian         22.29       44.86 ms     ±4.34%       44.25 ms       49.10 ms
via_unix               8.87      112.78 ms     ±1.92%      112.30 ms      116.65 ms

Comparison: 
via_gregorian         22.29
via_unix               8.87 - 2.51x slower +67.92 ms

@ruslandoga ruslandoga force-pushed the master branch 2 times, most recently from e19f920 to 8ffff4f Compare May 5, 2026 15:29
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.

Improve decoding for NaiveDateTime in RowBinary

1 participant