TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Faster CRC32-C on x86

107 pointsby rostayobalmost 3 years ago

2 comments

dragontameralmost 3 years ago
In short: there are three 32-bit crc32 pipelines on modern Intel CPUs, but also a clmul (carry less multiplication) instruction in AVX on a separate pipeline.<p>clmul was designed as a more general crc32 accelerator for the SIMD instructions set. (It is sufficiently general to also do Reed Solomon and Elliptical Curves. ARM has an equivalent pmul instruction if you are curious).<p>The traditional methods are to either use crc32 instruction, or the CLMUL instruction.<p>This blog post uses both instructions for maximum speed. Modern processors can execute different pipelines in parallel. So by placing CLMUL and crc32 instructions next to each other, you get the parallel execution with high efficiency.<p>It is tricky to calculate crc32 in parallel using two different instructions &#x2F; methodologies interleaved. But this blog post accomplishes that.
评论 #32307388 未加载
评论 #32333437 未加载
评论 #32310169 未加载
评论 #32310199 未加载
jscipionealmost 3 years ago
Is there a license associated with this code that I could use to include in an MIT licensed open source project? There are a couple of file system drivers that could use a faster crc32 check.