On 2014-12-30 21:36:19 +0530, Abhijit Menon-Sen wrote: > Thanks for spotting that. I had meant to change the test to "& 7". But > again, now that you mention it, I'm not sure it's necessary. The CRC32* > instructions don't have the usual SSE alignment requirements, and I see > that the Linux kernel (among other implementations) process eight bytes > at a time from the start of the buffer and then process the remaining > bytes one at a time. I'll do a bit more research and post an update.
I'd done some quick and dirty benchmarking when writing my initial crc32c POC and I found that four byte aligned accesses were faster than ones not. But it really just was running it a couple times, nothing more. Greetings, Andres Freund -- Andres Freund http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers