Re: Optimizing pg_trgm makesign() (was Re: WIP: Fast GiST index build) - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Optimizing pg_trgm makesign() (was Re: WIP: Fast GiST index build)
Date
Msg-id 16471.1309632370@sss.pgh.pa.us
Whole thread Raw
In response to Re: Optimizing pg_trgm makesign() (was Re: WIP: Fast GiST index build)  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
List pgsql-hackers
Heikki Linnakangas <heikki.linnakangas@enterprisedb.com> writes:
> Ah, that opens the door to do something I considered earlier but 
> rejected because of alignment: instead of three 32-bit word fetches, we 
> could fetch one 64-bit word and 32-bit word. Might shave a few more 
> cycles...

Hm ... I suspect that might be a small win on natively-64-bit machines,
but almost certainly a loss on 32-bitters.

> Meanwhile, I experimented with optimizing the other part of the loop: 
> the HASH() macros for setting the right bits in the signature.

Yeah, I was eyeing that too, but I'm hesitant to hard-wire assumptions
about the size of the signature.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: Optimizing pg_trgm makesign() (was Re: WIP: Fast GiST index build)
Next
From: Robert Haas
Date:
Subject: Re: [v9.2] Fix leaky-view problem, part 1