> -----Original Message-----
> From: Manfred Koizar [mailto:[EMAIL PROTECTED] 
> Sent: 25 May 2005 20:25
> To: Manfred Koizar
> Cc: Tom Lane; Greg Stark; Bruce Momjian; Mark Cave-Ayland 
> (External); pgsql-hackers@postgresql.org
> Subject: Re: [HACKERS] Cost of XLogInsert CRC calculations

(cut)

> The most important figure is, that at MaxSpeed (/O2) 2x32 is 
> almost twice as fast as CRC64 while only being marginally 
> slower than CRC32.
> 
> Servus
>  Manfred


Hi Manfred,

Sorry about taking a while to respond on this one - the hard drive on my
laptop crashed :(. I repeated your tests on my P4 laptop with gcc 3.2.3 and
reproduced the results below:


Opt     32     32a    32b    2x32   64     64a      64b
--------------------------------------------------------
O1      4.91   4.86   5.43   6.00   11.4   11.39    11.39
O2      4.96   4.94   4.69   5.18   15.86  18.75    24.73
O3      4.82   4.83   4.64   5.18   15.14  13.77    14.73

                           ^^^^^^^^^^^^

So in summary I would say:

        - Calculating a CRC64 using 2 x 32 int can be 3 times as fast as
using 1 x 64 int on
        my 32-bit Intel laptop with gcc.
        
        - The time difference between CRC32 and CRC64 is about 0.5s in the
worse case
        shown during testing, so staying with CRC64 would not inflict too
great a penalty.


Kind regards,

Mark.

------------------------
WebBased Ltd
South West Technology Centre
Tamar Science Park
Plymouth
PL6 8BT 

T: +44 (0)1752 797131
F: +44 (0)1752 791023
W: http://www.webbased.co.uk



---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

Reply via email to