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

Re: inline newNode()

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: Neil Conway <neilc(at)samurai(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>,PostgreSQL Patches <pgsql-patches(at)postgreSQL(dot)org>
Subject: Re: inline newNode()
Date: 2002-10-12 00:09:31
Message-ID: 200210120009.g9C09VM03268@candle.pha.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches
Peter Eisentraut wrote:
> Neil Conway writes:
> 
> > MemSet(): ~9.6
> > memset(): ~19.5
> > __builtin_memset(): ~10.00
> 
> I did my own tests with this code and the results vary wildly between
> platforms.  (I do not list __builtin_memset() because the results were
> invariably equal to memset().)
> 
> Platform	buffer	   memset()	MemSet()
> 
> freebsd		32	    5.3		 4.9
> freebsd		256	   23.3		24.2
> mingw		32	    0.5		 2.0
> mingw		256	    6.6		10.5
> unixware	256	   15.2		10.3
> unixware	1024	   29.2		34.1
> cygwin		256	    6.7		15.8
> 
> "freebsd" is i386-unknown-freebsd4.7 with GCC 2.95.4.
> "mingw" is i686-pc-mingw32 with GCC 3.2.
> "unixware" is i586-sco-sysv5uw7.1.3 with vendor compiler version 4.1.
> "cygwin" is i686-pc-cygwin with GCC 2.95.3.
> 
> GCC was run as 'gcc -O2 -Wall'.  (I also tried 'gcc -O3 -finline' but
> that gave only minimally better results.)  The SCO compiler was run as
> 'cc -O -Kinine -v'.
> 
> Make of those results what you will, but the current cross-over point of
> 1024 seems very wrong.

No question 1024 looks wrong on a lot of platforms.  On Sparc, we were
seeing a crossover even higher, and on many like BSD/OS, the crossover
is much lower.  Without some platform-specific test, I don't know how we
are going to set this correctly.  Should we develop such a test?  Do we
have enough MemSet usage in the 256-4k range that people would see a
difference between different MEMSET_LOOP_LIMIT values?

-- 
  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

pgsql-hackers by date

Next:From: Jeff DavisDate: 2002-10-12 02:08:18
Subject: Re: MySQL vs PostgreSQL.
Previous:From: Bruce MomjianDate: 2002-10-12 00:06:44
Subject: Re: inline newNode()

pgsql-patches by date

Next:From: Tom LaneDate: 2002-10-12 04:56:46
Subject: Re: .cvsignore file
Previous:From: Bruce MomjianDate: 2002-10-12 00:06:44
Subject: Re: inline newNode()

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