Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
A few minor perforamnce fixes (#470)
* improve `to_uint64` Reduces some allocations and intermediate work. PR: ``` julia> @benchmark JLD2.to_uint64(rand(UInt8, 5)) BenchmarkTools.Trial: 10000 samples with 983 evaluations. Range (min … max): 58.730 ns … 1.927 μs ┊ GC (min … max): 0.00% … 93.54% Time (median): 65.484 ns ┊ GC (median): 0.00% Time (mean ± σ): 75.603 ns ± 116.148 ns ┊ GC (mean ± σ): 10.53% ± 6.58% ▃▁▆█▆▂ ▂▄▆███████▆▅▄▄▃▃▃▃▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▁▂▂▂▂▂▂▂▂▂▂▂▂▂ ▃ 58.7 ns Histogram: frequency by time 117 ns < Memory estimate: 224 bytes, allocs estimate: 4. ``` Master: ``` julia> @benchmark JLD2.to_uint64(rand(UInt8, 5)) BenchmarkTools.Trial: 10000 samples with 981 evaluations. Range (min … max): 63.088 ns … 1.688 μs ┊ GC (min … max): 0.00% … 94.44% Time (median): 69.438 ns ┊ GC (median): 0.00% Time (mean ± σ): 78.976 ns ± 92.630 ns ┊ GC (mean ± σ): 8.47% ± 6.84% ▂▄▅▇▇█▇▆▅▅▄▃▃▃▂▂▃▂▂▁▁ ▂ ██████████████████████▇▇▆▆▇▆██▇█▇▇▇██▇▆▆▆▄▁▃▃▃▆▅▆▆▅▆▄▄▃▄▆██ █ 63.1 ns Histogram: log(frequency) by time 130 ns < Memory estimate: 256 bytes, allocs estimate: 4. ``` * fix failure to const-prop in error message this was not getting const propped, so just mark as such * improve type stability in show_group
- Loading branch information