Skip to content
phayes edited this page Apr 14, 2011 · 14 revisions

geoPHP optionally wraps the geos PHP extension. Below are some simple performance tests that I ran using both a large set of roads (2MB of JSON), and a really simple polygon. For the polygon, I looped the test 3000 times to get an average.

The results are number of seconds to complete the operation (lower is better). As you can see installing the geos-php extension at least doubles performance and can, in some cases, lead to a 10x improvement in performance.

Big Roads centroid

Without Geos: 1.2631900310516 secs
With Geos:    0.6027820110321 secs

Big Roads getBBox

Without Geos: 1.2799670696259 secs
With Geos:    0.6133630275726 secs

Simple Polygon centroid x3000

Without Geos: 0.21501302719116 secs
With Geos:    0.03558087348938 secs

Simple Polygon area x3000

Without Geos: 0.073577880859375 secs
With Geos:    0.009435892105102 secs

Simple Polygon getBBox x3000

Without Geos: 0.09908390045166 secs
Wit Geos:     0.05712819099426 secs
Clone this wiki locally