Re: Substituting Checksum Algorithm (was: Enabling Checksums) - Mailing list pgsql-hackers

From Andres Freund
Subject Re: Substituting Checksum Algorithm (was: Enabling Checksums)
Date
Msg-id 20130423084738.GA9063@awork2.anarazel.de
Whole thread Raw
In response to Substituting Checksum Algorithm (was: Enabling Checksums)  (Jeff Davis <pgsql@j-davis.com>)
Responses Re: Substituting Checksum Algorithm (was: Enabling Checksums)
List pgsql-hackers
On 2013-04-23 00:17:28 -0700, Jeff Davis wrote:
> + # important optimization flags for checksum.c
> + ifeq ($(GCC),yes)
> + checksum.o: CFLAGS += -msse4.1 -funroll-loops -ftree-vectorize
> + endif

I am pretty sure we can't do those unconditionally:
- -funroll-loops and -ftree-vectorize weren't always part of gcc afair, so we would need a configure check for those
- SSE4.1 looks like a total no-go, its not available everywhere. We *can* add runtime detection of that with gcc fairly
easilyand one-time if we wan't to go there (later?) using 'ifunc's, but that needs a fair amount of infrastructure
work.
- We can rely on SSE1/2 on amd64, but I think thats automatically enabled there.

Greetings,

Andres Freund

-- Andres Freund                       http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training &
Services



pgsql-hackers by date:

Previous
From: Ants Aasma
Date:
Subject: Re: Substituting Checksum Algorithm (was: Enabling Checksums)
Next
From: Dean Rasheed
Date:
Subject: Re: 9.3 Beta1 status report