[postgis-devel] Regression performance.
David Zwarg
dzwarg+postgis at azavea.com
Thu Feb 9 12:20:45 PST 2012
Hello,
I was profiling the performance of the changes that happened in r9112, and
it turned out to be very significant to pass and evaluate integers in the
prepared expression. Sticking with float8 values for the x and y positions
of the pixel contain significant performance benefits (although
counter-intuitive).
I've changed the x and y positions in 1 raster map algebra back to float
values for performance reasons.
These are my metrics for running 5 sets of 10 rasters, each 500x500 pixels,
from one of the SRTM tiles linked to by the WKTRaster tutorial page. Times
are in milliseconds. The first column is revision 9112 (removal of strstr
in the pixel loop, using integer as x and y pixel values), the second
column is that same revision (with a modification to use float8 instead of
int32 for x and y pixel coordinates), the third column is revision 9111
(using strstr in the pixel loop), the fourth column is the incorporation of
this change into the HEAD revision as of this morning (more memory
allocations have been moved out of the pixel loop).
r9112 r9112-int r9111 r9137 9839.746 8473.403 9094.589 7820.646 6228.067
5329.813 5763.88 4738.372 8749.516 7441.936 7893.893 6866.745 13618.762
11254.392 12177.314 10780.401 6233.851 5442.746 5730.231 4767.192
Thanks,
Zwarg
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20120209/e26255b5/attachment.html>
More information about the postgis-devel
mailing list