Skip to content

Instantly share code, notes, and snippets.

@LilithHafner
Last active October 23, 2021 20:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save LilithHafner/fa8e256e3f3778a0bd7d9d268b57aa72 to your computer and use it in GitHub Desktop.
Save LilithHafner/fa8e256e3f3778a0bd7d9d268b57aa72 to your computer and use it in GitHub Desktop.
this radix_sort! on 1:1_000_000
BenchmarkTools.Trial: 10000 samples with 1 evaluation.
Range (min … max): 63.794 μs … 7.205 ms ┊ GC (min … max): 0.00% … 97.86%
Time (median): 135.528 μs ┊ GC (median): 0.00%
Time (mean ± σ): 161.149 μs ± 366.831 μs ┊ GC (mean ± σ): 13.19% ± 5.67%
▃▇█▇▃▁
▂▂▃▂▂▂▂▂▂▁▂▂▂▂▂▂▃▆██████▇▅▅▄▃▃▃▃▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂ ▃
63.8 μs Histogram: frequency by time 270 μs <
Memory estimate: 156.84 KiB, allocs estimate: 7.
Base.sort!() on 1:1_000_000
BenchmarkTools.Trial: 8015 samples with 1 evaluation.
Range (min … max): 468.957 μs … 2.142 ms ┊ GC (min … max): 0.00% … 0.00%
Time (median): 495.257 μs ┊ GC (median): 0.00%
Time (mean ± σ): 516.175 μs ± 59.348 μs ┊ GC (mean ± σ): 0.00% ± 0.00%
▂▅▇██▇▅▂▁▂▂▂▂▂▂▁▁▁▁▁▁▂▂▂▂▁ ▂
███████████████████████████████████▇███▇▇▇▇▆▆▆▆▃▆▅▅▃▅▆▅▅▄▆▅▅ █
469 μs Histogram: log(frequency) by time 745 μs <
Memory estimate: 0 bytes, allocs estimate: 0.
Base.sort!(alg=SortingAlgorithms.RadixSort) on 1:1_000_000
BenchmarkTools.Trial: 10000 samples with 1 evaluation.
Range (min … max): 120.379 μs … 6.199 ms ┊ GC (min … max): 0.00% … 95.80%
Time (median): 174.108 μs ┊ GC (median): 0.00%
Time (mean ± σ): 203.237 μs ± 338.503 μs ┊ GC (mean ± σ): 10.55% ± 6.14%
▄▆█▅▃▁
▂▃▃▂▂▂▂▂▃▆██████▇▆▅▄▄▃▃▃▃▃▃▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▁▂▂ ▃
120 μs Histogram: frequency by time 365 μs <
Memory estimate: 174.81 KiB, allocs estimate: 9.
this radix_sort! on UInt64
BenchmarkTools.Trial: 10000 samples with 1 evaluation.
Range (min … max): 171.903 μs … 8.300 ms ┊ GC (min … max): 0.00% … 96.78%
Time (median): 240.879 μs ┊ GC (median): 0.00%
Time (mean ± σ): 270.017 μs ± 356.980 μs ┊ GC (mean ± σ): 7.70% ± 5.64%
▃▅█▇▆▄▂▂▁
▁▁▂▂▂▁▁▁▁▁▁▆█████████▇▆▅▄▃▃▂▂▂▂▂▂▁▂▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁ ▂
172 μs Histogram: frequency by time 421 μs <
Memory estimate: 157.02 KiB, allocs estimate: 5.
Base.sort!() on UInt64
BenchmarkTools.Trial: 9374 samples with 1 evaluation.
Range (min … max): 424.684 μs … 1.486 ms ┊ GC (min … max): 0.00% … 0.00%
Time (median): 450.276 μs ┊ GC (median): 0.00%
Time (mean ± σ): 468.035 μs ± 48.881 μs ┊ GC (mean ± σ): 0.00% ± 0.00%
▃▅▇██▇▅▃▂▂▂▂▂▂▂▂▂▂▂▁▁▂▂▂▂▂▁▁ ▂
▄███████████████████████████████▇▇▇█▇▇▇▇▆▇▇█▇▇▆▇▆▇▆▆▆▆▅▆▆▅▃▆ █
425 μs Histogram: log(frequency) by time 659 μs <
Memory estimate: 0 bytes, allocs estimate: 0.
Base.sort!(alg=SortingAlgorithms.RadixSort) on UInt64
BenchmarkTools.Trial: 10000 samples with 1 evaluation.
Range (min … max): 211.595 μs … 7.469 ms ┊ GC (min … max): 0.00% … 95.62%
Time (median): 288.804 μs ┊ GC (median): 0.00%
Time (mean ± σ): 349.557 μs ± 426.818 μs ┊ GC (mean ± σ): 8.79% ± 7.10%
▄█▆
▂▃▆████▅▄▃▃▃▃▃▃▃▃▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▁▂▂▂▁▂▂▁▂▁▂▂ ▃
212 μs Histogram: frequency by time 1.11 ms <
Memory estimate: 271.81 KiB, allocs estimate: 17.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment