[geos-devel] Remove ttmath?

Daniel Baston dbaston at gmail.com
Thu Apr 16 12:59:48 PDT 2020


I ran some of my performance benchmarks (overlay, PIP) am seeing
roughly equal or slightly better performance on the DD branch. So, sounds
like a win to me.

Dan

On Wed, Apr 15, 2020 at 5:17 PM Paul Ramsey <pramsey at cleverelephant.ca>
wrote:

> So, we ran into some issues with GEOS 3.8 on a Power architecture, and
> based on what tests failed, I suspect the issue is with our use of ttmath.
>
> In particular, this comment says to me (and just eyeballing what's going
> on) that there is some in-baked assumptions about endianness.
>
>
> https://github.com/libgeos/geos/blob/master/include/geos/algorithm/ttmath/ttmathbig.h#L2607-L2609
>
> The only reason we're using ttmath is because Mateusz happened to choose
> it for his initial experiments on supporting the higher precision code in
> JTS. Turns out there's no reason we cannot use exactly the same routines as
> JTS does, though, and they have NO ENDIAN assumptions in them, so they'll
> be portable.
>
> The port of the JTS code is here:
>
> https://github.com/libgeos/geos/pull/303
>
> Amazingly, all the regression tests still pass.
>
> Also, just based on running the full test suite, the DD code seems 5-10%
> faster than ttmath. This isn't entirely surprising, since ttmath is an
> arbitrary precision system, while doubledouble uses nothing but standard
> double math and the assumption that all double representations and
> operations are to IEEE spec.
>
> I'm going to port the JTS unit tests so we have a little more foundation
> under this work, but then I'd like to rip out ttmath in 3.9.
>
> I'm a little worried that we cannot support big-endian machines in 3.8, so
> I think we might consider back-porting this work to 3.8 and switch over to
> it for big-endian architectures.
>
> Paul
>
> _______________________________________________
> geos-devel mailing list
> geos-devel at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/geos-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geos-devel/attachments/20200416/ecaea8ef/attachment.html>


More information about the geos-devel mailing list