[postgis-devel] Aligned Speed

Mark Cave-Ayland mark.cave-ayland at siriusit.co.uk
Thu Jan 22 02:19:22 PST 2009


Paul Ramsey wrote:

> I did up a little test program to see if I could determine the extra
> performance around aligned access of *double. Not sure I'm seeing
> anything, but it could be my test is bogus.
> 
> P

Looks reasonably sane on first inspection, although clock() seems 
useless - on here it rounds to the nearest 10000 ticks, so 
gettimeofday() would be a better choice. And even then it shows 
unaligned access being faster which is totally bogus.

There should be some measurable difference with a fast enough clock, but 
as strk points out, the main reason we wish to align is to try and avoid 
the overhead of memcpy() when accessing points in large geometries.


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