Re: Compiling CVS HEAD with clang under OSX - Mailing list pgsql-hackers

From Martijn van Oosterhout
Subject Re: Compiling CVS HEAD with clang under OSX
Date
Msg-id 20100803204203.GA5102@svana.org
Whole thread Raw
In response to Re: Compiling CVS HEAD with clang under OSX  (Greg Stark <gsstark@mit.edu>)
List pgsql-hackers
On Mon, Aug 02, 2010 at 05:34:57PM +0100, Greg Stark wrote:
> Tom: Because that code is much more complex and prone to errors
> especially when you start getting into multiplication and other
> operations and it's also much slower than the code which allows
> overflow to happen and then checks that the result makes sense.

> I'm not entirely sure I agree. At least I haven't actually gone
> through all the arithmetic operations and I'm not sure how much more
> complex they get. If they were all at that level of complexity I think
> I would say we should go ahead and bite the performance bullet and do
> it the ultra-safe way.

FWIW, here's a site with some gcc magic which will allow you to detect
overflows during addition. Ofcourse, the fact that it's gcc specific
makes it a lot less useful.

http://www.fefe.de/intof.html

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Patriotism is when love of your own people comes first; nationalism,
> when hate for people other than your own comes first.
>                                       - Charles de Gaulle

pgsql-hackers by date:

Previous
From: Joshua Tolley
Date:
Subject: Re: GROUPING SETS revisited
Next
From: Boxuan Zhai
Date:
Subject: Re: merge command - GSoC progress