Skip site navigation (1) Skip section navigation (2)

Re: [PATCHES] equal() perf tweak

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Postgresql Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCHES] equal() perf tweak
Date: 2003-11-04 18:51:41
Message-ID: 3FA7F53D.30709@dunslane.net (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches
Tom Lane wrote:

>Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
>  
>
>>Just a thought - if we are messing with the List definition should we at 
>>the same time address the strict aliasing issues arising from Node's 
>>multiple personalities (I think it is the main offender).
>>    
>>
>
>  
>
>>Or is the intention never to do this, or not any time soon?
>>    
>>
>
>I have no intention of messing with the Node concept; it's built into
>the backend far too firmly to consider any significant change.
>
>I don't think we understand exactly what we'd have to avoid in order to
>enable strict aliasing, but if it requires getting rid of Node then it
>ain't happening.  (I doubt that it does, anyway.  I think the issues are
>probably quite localized.  The main problem I see is that we don't have
>any trustworthy check to find out everyplace that strict aliasing could
>cause problems.)
>
>  
>

*nod* (I made the last point previously :-) )

I don't claim that my understanding is anything like complete.

However, in the case of gcc it might be easier to fix than you think, 
without a lot of declaration rearranging, using gcc's new "may_alias" 
type attribute, (see 
http://gcc.gnu.org/onlinedocs/gcc-3.3.2/gcc/Type-Attributes.html ) which 
could probably be added in a very few places (e.g. Node's typedef) to 
fix things.

Of course, that doesn't help when vendor foo's compiler starts doing 
type-based alias analysis.

Still, to quote "Airplane", that's not important right now.

cheers

andrew


In response to

pgsql-hackers by date

Next:From: Gaetano MendolaDate: 2003-11-04 18:55:39
Subject: Re: 7.4RC1 tag'd, branched and bundled ...
Previous:From: Greg StarkDate: 2003-11-04 18:28:58
Subject: Re: Experimental patch for inter-page delay in VACUUM

pgsql-patches by date

Next:From: Peter EisentrautDate: 2003-11-05 00:14:32
Subject: Re: UW 713UP3 patch
Previous:From: Tom LaneDate: 2003-11-04 17:31:21
Subject: Re: [PATCHES] equal() perf tweak

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group