JuliaGeo / LibGEOS.jl

Julia package for manipulation and analysis of planar geometric objects
MIT License
72 stars 24 forks source link

Faster hash and equality #159

Closed jw3126 closed 1 year ago

jw3126 commented 1 year ago

Follow up on #147

This does not use SIMD right now. My guess is that coordinates are stored in contiguous memory internally in LibGEOS, so SIMD should be possible in theory. But is there any public API to get a pointer to the coordinates array?

At least this PR elliminates all allocs except 16bytes in the hash case.

rafaqz commented 1 year ago

Maybe calling getCoordSeq can help for LineString/LinearRing and anything built from them?

Edit: oh you are. I though that contained a pointer to the array of coordinates.

jw3126 commented 1 year ago

bump

jw3126 commented 1 year ago

More code comments and cleaner function names would help, this is pretty dense code with no explanations.

I tried to make it much simpler, at the cost of a few more allocs.

jw3126 commented 1 year ago

@rafaqz LGTY?

rafaqz commented 1 year ago

@visr or @yeesian happy to merge this? I haven't maintained this package much so not really my call