Re: Cost of XLogInsert CRC calculations - Mailing list pgsql-hackers

From Hannu Krosing
Subject Re: Cost of XLogInsert CRC calculations
Date
Msg-id 1116401061.4809.4.camel@fuji.krosing.net
Whole thread Raw
In response to Re: Cost of XLogInsert CRC calculations  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Cost of XLogInsert CRC calculations
List pgsql-hackers
On T, 2005-05-17 at 22:37 -0400, Tom Lane wrote:
> Bruce Momjian <pgman@candle.pha.pa.us> writes:
> > I don't understand why we are testing 64-bit CRC when I thought we
> > agreed that 32-bit was good enough for our purposes.
> 
> Well, we need to understand exactly what is going on here.  I'd not
> like to think that we dropped back from 64 to 32 bit because of one
> possibly-minor optimization bug in one compiler on one platform.
> Even if that compiler+platform is 90% of the market.

There are cases where 32bit is about 20% slower.

I tried to send the folowing yesterday, but for some reason the mails I
send from home where To: is Tom Lane get errors from
"RCPT:tgl@sss.pgh.pa.us " and fail to go through to other destinations
(like pgsql-hackers) after that :(
-----

crc32 compiled as 32bit executable is 10% slower than crc64 as eithet 32
or 64 bit exe, but if you compile your backend as 64bit then the
difference is almost 20%. crc64 is the same speed compiled either way.

gcc version 3.4.3 20041212 (Red Hat 3.4.3-9.EL4)
on OpenPower5 1.8GHz

file ./crctest
./crctest: ELF 32-bit MSB executable, PowerPC or cisco 4500, version 1
(SYSV)
cc -O1 crctest.c -o crctest -- time 0.584327 s
cc -O2 crctest.c -o crctest -- time 0.594664 s
cc -O3 crctest.c -o crctest -- time 0.594764 s

file ./crctest
./crctest: ELF 64-bit MSB executable, cisco 7500, version 1 (SYSV)
cc -O1 -m64 crctest.c -o crctest -- time 0.644473 s
cc -O2 -m64 crctest.c -o crctest -- time 0.648033 s
cc -O3 -m64 crctest.c -o crctest -- time 0.688682 s

file ./crctest64
./crctest64: ELF 64-bit MSB executable, cisco 7500, version 1 (SYSV)
cc -O1 -m64 crctest64.c -o crctest64 -- time 0.545026 s
cc -O2 -m64 crctest64.c -o crctest64 -- time 0.545470 s
cc -O3 -m64 crctest64.c -o crctest64 -- time 0.545037 s

file ./crctest64
./crctest64: ELF 32-bit MSB executable, PowerPC or cisco 4500, version 1
(SYSV)
cc -O1 crctest64.c -o crctest64 -- time 0.545364 s
cc -O2 crctest64.c -o crctest64 -- time 0.644093 s
cc -O3 crctest64.c -o crctest64 -- time 0.644155 s
tgl@sss.pgh.pa.us

-- 
Hannu Krosing <hannu@skype.net>



pgsql-hackers by date:

Previous
From: Hannu Krosing
Date:
Subject: Re: SQL99 hierarchical queries stalled
Next
From: Hannu Krosing
Date:
Subject: Re: Learning curves and such (was Re: pgFoundry)