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

Re: [Fwd: Re: UnixWare 7.1.3 (BETA), C99 compiler,

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Larry Rosenman <ler(at)lerctr(dot)org>
Cc: Dave Prosser <dfp(at)caldera(dot)com>, borealis(at)lists(dot)caldera(dot)com,jls(at)caldera(dot)com, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [Fwd: Re: UnixWare 7.1.3 (BETA), C99 compiler,
Date: 2002-10-28 16:07:09
Message-ID: 14810.1035821229@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackers
Larry Rosenman <ler(at)lerctr(dot)org> forwards:
>>> My inclination is to change the code for ApplySortFunction to look like
>>> 
>>> #if defined(__GNUC__)
>>> __inline__
>>> #endif
>>> int32
>>> ApplySortFunction
>>> 
>>> so that the inline optimization only gets done for gcc, which we know
>>> interprets inline sanely.  Anyone see a better answer?
>> 
>> You've given us one source file.  Is ApplySortFunction() really called
>> from other files?  Another approach, assuming both this and that the
>> inlining is viewed as important for its three calls within this file,

Yup, both of those are correct: the performance-critical calls are in
the same file, but there are others.

>> to have a front end version of an internal function.  To wit:
>> 
>> static inline int32
>> StaticApplySortFunction(FmgrInfo *sortFunction, SortFunctionKind kind,
>> Datum datum1, bool isNull1,
>> Datum datum2, bool isNull2)
>> {
>> //etc.
>> }
>> 
>> int32
>> ApplySortFunction(FmgrInfo *sortFunction, SortFunctionKind kind,
>> Datum datum1, bool isNull1,
>> Datum datum2, bool isNull2)

Grumble.  I suppose we have to do it that way, but it's really pretty
stupid.  Also, won't this fall foul of the original restriction
(ApplySortFunction referencing the static function myFunctionCall2)?
If not, why not?

> Until the open source base (and GCC) get around to matching the C99
> inline model,

Don't hold your breath... it looks like a net loss in functionality
for no gain, from where I sit.

			regards, tom lane

In response to

Responses

pgsql-hackers by date

Next:From: Larry RosenmanDate: 2002-10-28 16:19:15
Subject: Re: [HACKERS] Request for supported platforms
Previous:From: Dave PageDate: 2002-10-28 15:58:09
Subject: Re: [HACKERS] Request for supported platforms

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