On 09/02/2021 22:08, John Naylor wrote:
Maybe there's a smarter way to check for zeros in C. Or maybe be more careful about cache -- running memchr() on the whole input first might not be the best thing to do.

The usual trick is the haszero() macro here: https://graphics.stanford.edu/~seander/bithacks.html#ZeroInWord. That's how memchr() is typically implemented, too.

- Heikki


Reply via email to