Re: Inline MemoryContextSwitchTo? - Mailing list pgsql-hackers

From Karel Zak
Subject Re: Inline MemoryContextSwitchTo?
Date
Msg-id 1107763989.3518.8.camel@petra
Whole thread Raw
In response to Inline MemoryContextSwitchTo?  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Inline MemoryContextSwitchTo?  ("Simon Riggs" <simon@2ndquadrant.com>)
List pgsql-hackers
On Sun, 2005-02-06 at 18:05 -0500, Tom Lane wrote:
> Can anyone think of a reason we aren't inlining MemoryContextSwitchTo()
> in GCC builds, similarly to the way list_head() et al are handled?
> 
> It wouldn't be a huge gain, but I consistently see MemoryContextSwitchTo
> eating a percent or three of most profiles.

Sounds good. 

I think we can inlining all MemoryContext functions which check memory
context header and call context->metods->...() only. An example
MemoryContextAlloc() that is very often called from code too.
Karel

-- 
Karel Zak <zakkr@zf.jcu.cz>



pgsql-hackers by date:

Previous
From: "Premsun Choltanwanich"
Date:
Subject: Re: How can I use large object on PostgreSQL Linux
Next
From: "Simon Riggs"
Date:
Subject: Re: Thinking about breaking up the BufMgrLock