kadyb / vector-benchmark

Vector processing benchmarks for Python and R packages
https://kadyb.github.io/vector-benchmark/report.html
MIT License
18 stars 3 forks source link

More complex benchmarks #13

Open martinfleis opened 5 months ago

martinfleis commented 5 months ago

Hey @kadyb,

would you be up for expanding the benchmarks with more complex tasks? I have a felling that those you have in here now, especially for buffer and distance, can be a bit misleading. Since both of them are based on points only, some libraries (terra, sf) have a special fast-path for them. I would be interested in more complex options, like distance between polygons and buffering of polygons. Right now, these tests sort of only check if the library has a fast-path implemented for these or not.

kadyb commented 5 months ago

Sure! I will try to add the tasks you suggested. If you have more ideas for tasks, let me know.

martinfleis commented 5 months ago

Maybe some binary constructive method like intersection or difference. We have unary constructive (buffer) and predicate only.

Maybe WKT parsing? Or unary union may be also interesting. That tends to be expensive.

martinfleis commented 5 months ago

This is an example of what I was talking about regarding the fast-path distance algo - https://github.com/shapely/shapely/issues/2038

kadyb commented 5 months ago

Maybe we should report this in the GEOS repository? sf uses a base function from R, i.e. dist(), but this is not the fastest way. Even better results are provided by the Rfast::Dist(), which is written in C++.

martinfleis commented 5 months ago

Maybe we should report this in the GEOS repository?

Yeah, @theroggy suggested the same in the shapely issue. Will do.

sf uses a base function from R, i.e. dist(), but this is not the fastest way

I don't think so, see https://github.com/r-spatial/sf/blob/32aa6c8c53005245493540b1359bc35fe50f0115/R/geom-measures.R#L200-L203 But I know little about the performance of R world.

kadyb commented 5 months ago

by_element is FALSE, so this path: https://github.com/r-spatial/sf/blob/32aa6c8c53005245493540b1359bc35fe50f0115/R/geom-measures.R#L207-L208

martinfleis commented 5 months ago

Ah, okay. You see I know nothing about R :D.

The GEOS issue - https://github.com/libgeos/geos/issues/1066

kadyb commented 5 months ago

After the workshop in Prague, you will be specialist in R and Julia 😄

theroggy commented 5 months ago

They won't be directly usable, but you can get some inspiration for some possible benchmarks for more complex spatial operations here: https://github.com/geofileops/geobenchmark/blob/main/results_vector_ops/GeoBenchmark.png