go-spatial / geom

Geometry interfaces to help drive interoperability within the Go geospatial community
MIT License
168 stars 37 forks source link

cmp: more accurate handling of large and small numbers #75

Closed ear7h closed 5 years ago

ear7h commented 5 years ago

I also renamed TOLERANCE to conform with Go conventions

performance difference (slower as expected)

name        old time/op    new time/op    delta
CmpFloat-4    4.89ms ± 1%    5.53ms ± 1%  +12.93%  (p=0.000 n=8+7)

name        old alloc/op   new alloc/op   delta
CmpFloat-4     66.7B ± 1%     75.1B ± 1%  +12.63%  (p=0.001 n=7+7)

name        old allocs/op  new allocs/op  delta
CmpFloat-4      0.00           0.00          ~     (all equal)