Re: Compiling CVS HEAD with clang under OSX

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Greg Stark <gsstark(at)mit(dot)edu>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Neil Conway <neil(dot)conway(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Compiling CVS HEAD with clang under OSX
Date: 2010-08-03 20:42:04
Message-ID: 20100803204203.GA5102@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)svana(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Boxuan Zhai 2010-08-03 20:57:05 Re: merge command - GSoC progress
Previous Message Joshua Tolley 2010-08-03 20:20:52 Re: GROUPING SETS revisited