4 ms·
Existing library which does the same thing, and faster, with arbitrary polynomials: http://code.google.com/p/crcutil/ http://code.google.com/p/crcutil/
by tlipcon 12y ago
Existing library which does the same thing, and faster, with arbitrary polynomials: http://code.google.com/p/crcutil/ http://code.google.com/p/crcutil/
- seiji 12y agoNot entirely the same. The problem isn't the polynomial, but the entire model. crcutil also has many fatal flaws for inclusion in other projects: the code is horrifically ugly, it's hosted on google code so it looks unmaintained and abandoned, it's C++, it uses unreadable ASM to be "fast" but that's not portable across all the architectures Redis runs on, and it has a horrible build system (because of ASM and C++ and other issues).
- tlipcon 12y agoTrue it's a pain to embed. We embedded it in my current project, and it only took a few hours to add a CMakeLists.txt and make it reasonably embeddable. I guess if your project doesn't want to include C++ (and you don't want to write a simple C wrapper), you've got a fair point. But it sounds like their implementation is significantly faster than the one in the linked post.