[postgis-devel] Float vs Double Box

Mateusz Łoskot mateusz at loskot.net
Fri Nov 11 07:11:15 PST 2011


On 9 November 2011 17:43, Paul Ramsey <pramsey at opengeo.org> wrote:
> So, we've had this argument before, and Mark wanted double boxes for
> simplicity, and I wanted float boxes to keep index sizes down.
>
> And I realized on the way into work that actually we could have both,

Calculate using double, store/serialise in float.
Use of different sizes of float-point type in the same expression has
nearly zero effect on run-time performance. On memory side,
you stick to the same bandwidth.
(I'm forgetting here about possible side effects like precision of
operation is different than expected.)

Best regards,
-- 
Mateusz Loskot, http://mateusz.loskot.net



More information about the postgis-devel mailing list