Closed jbytecode closed 1 year ago
julia> @benchmark reverse(map(i-> 43543523 >> i & 1, 0:31))
BenchmarkTools.Trial: 10000 samples with 973 evaluations.
Range (min … max): 68.154 ns … 440.565 ns ┊ GC (min … max): 0.00% … 62.67%
Time (median): 83.844 ns ┊ GC (median): 0.00%
Time (mean ± σ): 94.819 ns ± 32.122 ns ┊ GC (mean ± σ): 4.78% ± 10.19%
▇█▂
▁▃▆███▇▅▄▄▃▃▃▂▂▂▂▂▂▂▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁ ▂
68.2 ns Histogram: frequency by time 245 ns <
Memory estimate: 672 bytes, allocs estimate: 2.
julia> @benchmark map(i-> 43543523 >> i & 1, 31:(-1):0)
BenchmarkTools.Trial: 10000 samples with 996 evaluations.
Range (min … max): 28.897 ns … 4.360 μs ┊ GC (min … max): 0.00% … 97.10%
Time (median): 93.365 ns ┊ GC (median): 0.00%
Time (mean ± σ): 88.328 ns ± 246.935 ns ┊ GC (mean ± σ): 16.53% ± 5.90%
█▁
▄██▅▅▄▃▃▃▃▃▃▃▃▃▃▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▁▂▂▁▂▂▄▇▇█▅▄▅▄▄▃▄▄▃▃▃▃▃▃▂▂▂▂ ▃
28.9 ns Histogram: frequency by time 137 ns <
Memory estimate: 336 bytes, allocs estimate: 1.
Nice! Thank you!
@jmejia8 - thank you for merging!
This PR replaces
with
and this makes it approximately 2x faster in the bit calculations of MCCGA.