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

Re: inline newNode()

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Neil Conway <neilc(at)samurai(dot)com>
Cc: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>,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-10 17:38:05
Message-ID: Pine.LNX.4.44.0210101935180.928-100000@localhost.localdomain (view raw, whole thread or download thread mbox)
Lists: pgsql-hackerspgsql-patches
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.

Peter Eisentraut   peter_e(at)gmx(dot)net

In response to


pgsql-hackers by date

Next:From: Bruce MomjianDate: 2002-10-10 18:41:27
Subject: Re: Open items
Previous:From: Neil ConwayDate: 2002-10-10 17:34:14
Subject: Re: Open items

pgsql-patches by date

Next:From: Neil ConwayDate: 2002-10-11 01:15:03
Subject: fix typos in README.dbmirror
Previous:From: Neil ConwayDate: 2002-10-10 17:28:47
Subject: Re: inline newNode()

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