Re: tweaking MemSet() performance

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Larry Rosenman <ler(at)lerctr(dot)org>
Cc: Alvaro Herrera <alvherre(at)atentus(dot)com>, andrew(at)libertyrms(dot)info, pgsql-hackers(at)postgresql(dot)org
Subject: Re: tweaking MemSet() performance
Date: 2002-08-30 01:20:14
Message-ID: 200208300120.g7U1KE712030@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)candle(dot)pha(dot)pa(dot)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(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tatsuo Ishii 2002-08-30 01:25:48 Re: SRF memory mgmt patch
Previous Message Tom Lane 2002-08-30 00:46:24 Re: SRF memory mgmt patch (was [HACKERS] Concern about memory management with SRFs)