Re: [RFC] overflow checks optimized away - Mailing list pgsql-hackers

From Greg Stark
Subject Re: [RFC] overflow checks optimized away
Date
Msg-id CAM-w4HNKwWShhVf6jKgQA=bc7UhmXveO-wQ43QAtThAb1=jv6A@mail.gmail.com
Whole thread Raw
In response to Re: [RFC] overflow checks optimized away  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [RFC] overflow checks optimized away  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Thu, Dec 3, 2015 at 2:51 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> I can't see us moving the compiler goalposts one inch for this.
> "I'm going to break building on your compiler in order to work around
> bugs in somebody else's compiler" isn't gonna fly.

Fwiw the builtins offer a carrot as well. They promise to use
architecture features like arithmetic status flags which can be faster
than explicit comparisons and also avoid extra branches that can mess
up cache and branch prediction.

I was proposing to implement wrappers around them that do the checks
manually if they're not present.

-- 
greg



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: [RFC] overflow checks optimized away
Next
From: Tom Lane
Date:
Subject: Re: [RFC] overflow checks optimized away