Re: Optimize Arm64 crc32c implementation in Postgresql - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Optimize Arm64 crc32c implementation in Postgresql
Date
Msg-id 10924.1522777638@sss.pgh.pa.us
Whole thread Raw
In response to Re: Optimize Arm64 crc32c implementation in Postgresql  (Heikki Linnakangas <hlinnaka@iki.fi>)
Responses Re: Optimize Arm64 crc32c implementation in Postgresql  (Heikki Linnakangas <hlinnaka@iki.fi>)
List pgsql-hackers
Heikki Linnakangas <hlinnaka@iki.fi> writes:
> I was just about to commit this, when I started to wonder: Do we need to 
> worry about alignment? As the patch stands, it will merrily do unaligned 
> 8-byte loads. Is that OK on ARM? It seems to work on the system I've 
> been testing on, but I don't know. And even if it's OK, would it perform 
> better if we did 1-byte loads in the beginning, until we reach the 
> 8-byte boundary?

I'm pretty sure that some ARM platforms emulate unaligned access through
kernel trap handlers, which would certainly make this a lot slower than
handling the unaligned bytes manually.  Maybe that doesn't apply to any
ARM CPU that has this instruction ... but as you said, it'd be better
to consider the presence of the instruction as orthogonal to other
CPU features.

            regards, tom lane


pgsql-hackers by date:

Previous
From: Jesper Pedersen
Date:
Subject: Re: [HACKERS] Runtime Partition Pruning
Next
From: Beena Emerson
Date:
Subject: Re: [HACKERS] Runtime Partition Pruning