Using SSE4.2 or more is trivial. Same goes for fast hashes with the crc32 intrinsic. Mostly the compiler does it for you (-march=native)
But you cannot assume everybody has such a CPU. Hence you'd either need to compile your own (a la macports, gentoo, perl, ...) or do run-time checks for the CPU feature and switch to the fast version then.
But you cannot assume everybody has such a CPU. Hence you'd either need to compile your own (a la macports, gentoo, perl, ...) or do run-time checks for the CPU feature and switch to the fast version then.