package
0.53.0
Repository: https://github.com/peterstace/simplefeatures.git
Documentation: pkg.go.dev

# README

Benchmark Reports

This report shows the performance difference between Simple Feature's native set operations (pure Go) and the corresponding GEOS set operations.

To re-run the reports, use the run.sh script (it generates the markdown tables below).

The source code for the benchmarks below is here. The benchmarks create two regular polygons, each with n sides (where n is the input size in the tables below). The polygons partially overlap with each other. The set operation on the two regular polygons is what is actually timed.

Operation: Intersection

Input SizeSimple FeaturesGEOSRatio
2239.2µs46.7µs0.8
2348.1µs54.3µs0.9
2465.2µs59.5µs1.1
25113µs72.1µs1.6
26190µs94.9µs2.0
27354µs144µs2.5
28647µs215µs3.0
291.28ms385µs3.3
2102.47ms718µs3.4
2115.36ms1.46ms3.7
21211.1ms2.66ms4.2
21322.1ms5.73ms3.9
21444.7ms11.6ms3.9

Operation: Union

Input SizeSimple FeaturesGEOSRatio
2240.8µs49.6µs0.8
2350.2µs55.6µs0.9
2472.3µs67.5µs1.1
25122µs86µs1.4
26215µs127µs1.7
27390µs190µs2.1
28729µs318µs2.3
291.42ms574µs2.5
2102.83ms1.19ms2.4
2115.99ms2.19ms2.7
21212.7ms4.7ms2.7
21325.9ms9.42ms2.7
21455ms20.3ms2.7

Operation: Difference

Input SizeSimple FeaturesGEOSRatio
2240.1µs48.9µs0.8
2348µs55.6µs0.9
2468.7µs64.8µs1.1
25117µs79.9µs1.5
26203µs116µs1.7
27370µs172µs2.1
28691µs281µs2.5
291.37ms512µs2.7
2102.66ms1.03ms2.6
2115.63ms1.85ms3.0
21212ms4.02ms3.0
21325.1ms8.09ms3.1
21453.2ms17.2ms3.1

Operation: SymmetricDifference

Input SizeSimple FeaturesGEOSRatio
2251.5µs68.2µs0.8
2363.9µs79.4µs0.8
2498.8µs102µs1.0
25161µs137µs1.2
26286µs210µs1.4
27512µs335µs1.5
281ms618µs1.6
291.91ms1.15ms1.7
2103.93ms2.32ms1.7
2118.06ms4.46ms1.8
21217.1ms9.86ms1.7
21334.1ms19.5ms1.7
21471ms38.3ms1.9