JuliaPolyhedra / Polyhedra.jl

Polyhedral Computation Interface
Other
172 stars 27 forks source link

Speed up with MutableArithmetics #343

Open blegat opened 1 month ago

blegat commented 1 month ago

Before

BenchmarkTools.Trial: 10000 samples with 4 evaluations.
 Range (min … max):   8.011 μs …  40.041 ms  ┊ GC (min … max):  0.00% … 99.93%
 Time  (median):      8.852 μs               ┊ GC (median):     0.00%
 Time  (mean ± σ):   15.422 μs ± 401.401 μs  ┊ GC (mean ± σ):  34.24% ±  4.36%

   ▃▅▇██▇▆▅▄▃▂▂▁▂▁▁▁▁                       ▁▂▃▄▄▄▄▄▃▃▂▂▁▁     ▃
  ▇█████████████████████▇▇█▆▇▅▆▁▅▁▁▄▃▁▁▃▁▃▆▇███████████████▇▇▆ █
  8.01 μs       Histogram: log(frequency) by time      16.6 μs <

 Memory estimate: 31.62 KiB, allocs estimate: 597.

After

BenchmarkTools.Trial: 10000 samples with 7 evaluations.
 Range (min … max):  4.033 μs …  17.567 ms  ┊ GC (min … max):  0.00% … 99.92%
 Time  (median):     4.293 μs               ┊ GC (median):     0.00%
 Time  (mean ± σ):   7.163 μs ± 175.969 μs  ┊ GC (mean ± σ):  30.43% ±  3.89%

  ▁▆██▇▅▃▁▁▁▁▁                           ▁▂▂▃▃▃▄▃▃▃▃▂▁        ▂
  ██████████████▇▆▆▆▆▆▅▅▄▄▂▄▄▅▅▇▇▆▄▃▂▄▆▆███████████████▇▇▇▅▅▅ █
  4.03 μs      Histogram: log(frequency) by time      8.13 μs <

 Memory estimate: 14.02 KiB, allocs estimate: 254.