[postgis-devel] Re: Cost of memcmp
Mark Cave-Ayland
mark.cave-ayland at siriusit.co.uk
Tue Oct 7 13:39:05 PDT 2008
Paul Ramsey wrote:
> I think I'm convinced that, thought memcmp is a non-zero cost,
> compared to the cost of EVERYTHING ELSE, it's a very small cost. (For
> example, I calculated, based on the numbers below, that the memcmp
> cost of my standard 8000-overlayed-with-80 test data would be about
> 40ms, and the current code returns results in about 8000ms. So a 0.5%
> performance penalty.)
>
> P.
Wow that's an impressive result. I must say I was expecting around 5-10%
overhead using memcmp() but then again some googling shows that for some
architectures, the glibc people have hand-coded optimised in-line
assembler(!) so maybe this isn't totally out of the bounds of reality.
I suspect that the overhead will be higher than this for the real case,
but this is still an encouraging result never the less. I'm fairly tied
up now until next week, so if anyone else wants to have a go...
ATB,
Mark.
--
Mark Cave-Ayland
Sirius Corporation - The Open Source Experts
http://www.siriusit.co.uk
T: +44 870 608 0063
More information about the postgis-devel
mailing list