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

From Simon Riggs
Subject Re: Cost of XLogInsert CRC calculations
Date
Msg-id 1115913136.3830.419.camel@localhost.localdomain
Whole thread Raw
In response to Re: Cost of XLogInsert CRC calculations  ("Mark Cave-Ayland" <m.cave-ayland@webbased.co.uk>)
Responses Re: Cost of XLogInsert CRC calculations  ("Mark Cave-Ayland" <m.cave-ayland@webbased.co.uk>)
List pgsql-hackers
On Thu, 2005-05-12 at 13:48 +0100, Mark Cave-Ayland wrote:
> > From: Christopher Kings-Lynne [mailto:chriskl@familyhealth.com.au] 
> > 
> > >>perhaps the CRC-32 routines could be written in in-line assembler
> > > 
> > > 
> > > If you can do this, step right up. :-)
> > > 
> > > Best Regards, Simon Riggs
> > 
> > Surely there's an open source code floating around somewhere?
> > 

> I've found some x86 MASM sources using Google, but nothing in GCC-style
> in-line assembler. It would be good to see how this compares in terms of
> speed with the code generated by GCC.

Is it BSD? I looked for some other BSD code last month. There was some,
but it was clearly slower than the existing code.

It might be possible to speed things up by a factor of two using a two-
byte lookup table rather than a one byte lookup. This would take up
65536 table entries, which is only 256KB. If we held that in shared
memory we could calculate the entries at startup, or read them in from a
file. It would only use the same space as if we had 255 connections, so
not a great increase in memory usage overall. Need to look at the effect
of retrieving everything from memory rather than from cache, so it
probably wouldn't be twice as fast.

Best Regards, Simon Riggs



pgsql-hackers by date:

Previous
From: Andreas Pflug
Date:
Subject: Re: New Contrib Build?
Next
From: Josh Berkus
Date:
Subject: Re: New Contrib Build?