Re: tweaking MemSet() performance - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: tweaking MemSet() performance
Date
Msg-id 200208300120.g7U1KE712030@candle.pha.pa.us
Whole thread Raw
In response to Re: tweaking MemSet() performance  (Larry Rosenman <ler@lerctr.org>)
List pgsql-hackers
Larry Rosenman wrote:
> On Thu, 2002-08-29 at 18:53, Alvaro Herrera wrote:
> > En Thu, 29 Aug 2002 19:35:13 -0400 (EDT)
> > Bruce Momjian <pgman@candle.pha.pa.us> escribi?:
> > 
> > > In your results it seems to suggest that memset() gets slower for longer
> > > buffer lengths, and a for loop starts to win at longer sizes.  Should I
> > > pull out my Solaris kernel source and see what memset() is doing?
> > 
> > No, because memset() belongs to the libc AFAICS...  Do you have source
> > code for that?
> and if you do, what vintage is it?  I believe Solaris has mucked with
> stuff over the last few rev's. 

OK, I am not permitted to discuss the contents of the source with anyone
except other Solaris source licensees, but I can say that there isn't
anything fancy in the source.

There is nothing that would explain the slowdown of memset >512 bytes
compared to MemSet.  All lengths 64, 128, ... use the same algorithm in
the memset code.

I got the source from the now-cancelled Solaris Foundation Source
Program:
http://wwws.sun.com/software/solaris/source/

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
359-1001+  If your life is a hard drive,     |  13 Roberts Road +  Christ can be your backup.        |  Newtown Square,
Pennsylvania19073
 


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Proposed GUC Variable
Next
From: "D'Arcy J.M. Cain"
Date:
Subject: Re: Type definition process (was Re: MemoryContextAlloc: invalid request size 1934906735)