in reply to How to process each byte in a binary file?

Thus far, unpack"C" is the fastest. vec is 9% faster on a small input, 2% on a larger input, so there may be setup overhead there?

substr is about 10% slower than vec.

The regex/g is 1/3 to 1/2 the speed of substr. And using IO::Scalar is ten times slower than that!

—John