jacobusmmsmit / DiscreteVoronoi.jl

Julia implementation of various algorithms for calculating discrete Voronoi diagrams.
MIT License
5 stars 1 forks source link

Fix issue #25 #30

Open goerch opened 2 years ago

goerch commented 2 years ago

My current benchmark numbers look fine now:

(n, s) = (400, 20)
jfa_voronoi!
  42.500 ms (0 allocations: 0 bytes)
dac_voronoi!
  3.335 ms (0 allocations: 0 bytes)
redac_voronoi!
exact_aux = DiscreteVoronoi.exact_aux
  1.216 ms (0 allocations: 0 bytes)
centre_anchor_aux = DiscreteVoronoi.centre_anchor_aux
  1.168 ms (0 allocations: 0 bytes)
redac_voronoi_es!
exact_aux_es = DiscreteVoronoi.exact_aux_es
  1.142 ms (0 allocations: 0 bytes)
centre_anchor_aux_es = DiscreteVoronoi.centre_anchor_aux_es
  1.070 ms (0 allocations: 0 bytes)
(n, s) = (400, 400)
jfa_voronoi!
  50.611 ms (0 allocations: 0 bytes)
dac_voronoi!
  260.228 ms (0 allocations: 0 bytes)
redac_voronoi!
exact_aux = DiscreteVoronoi.exact_aux
  8.290 ms (0 allocations: 0 bytes)
centre_anchor_aux = DiscreteVoronoi.centre_anchor_aux
  6.158 ms (0 allocations: 0 bytes)
redac_voronoi_es!
exact_aux_es = DiscreteVoronoi.exact_aux_es
  7.802 ms (0 allocations: 0 bytes)
centre_anchor_aux_es = DiscreteVoronoi.centre_anchor_aux_es
  5.792 ms (0 allocations: 0 bytes)
(n, s) = (400, 8000)
jfa_voronoi!
  66.824 ms (0 allocations: 0 bytes)
redac_voronoi!
exact_aux = DiscreteVoronoi.exact_aux
  204.743 ms (0 allocations: 0 bytes)
centre_anchor_aux = DiscreteVoronoi.centre_anchor_aux
  40.037 ms (0 allocations: 0 bytes)
redac_voronoi_es!
exact_aux_es = DiscreteVoronoi.exact_aux_es
  199.415 ms (0 allocations: 0 bytes)
centre_anchor_aux_es = DiscreteVoronoi.centre_anchor_aux_es
  39.513 ms (0 allocations: 0 bytes)
(n, s) = (400, 160000)
jfa_voronoi!
  51.920 ms (0 allocations: 0 bytes)
redac_voronoi!
exact_aux = DiscreteVoronoi.exact_aux
  435.400 μs (0 allocations: 0 bytes)
centre_anchor_aux = DiscreteVoronoi.centre_anchor_aux
  432.400 μs (0 allocations: 0 bytes)
redac_voronoi_es!
exact_aux_es = DiscreteVoronoi.exact_aux_es
  312.100 μs (0 allocations: 0 bytes)
centre_anchor_aux_es = DiscreteVoronoi.centre_anchor_aux_es
  313.900 μs (0 allocations: 0 bytes)

We could include preset_voronoi! into dac_voronoi! and redac_voronoi!. What do you prefer?