I wouldn't assume that `map!` is any faster without testing it, in my experience most of those bang methods are implemented in terms of the non-bang method and swapping internal ruby pointers

I suspect this will be faster as it utilizes the c runtime more:

    value.unpack("H*").first.gsub(/../, '\x\0')

But honestly I don't think squeezing every ounce of performance out of this is critical, I get the impression that the text representation is mostly used for debugging and convenience for things like config files, not for critical paths.