If we know its a bytearray, we should be able to just duplicate the memory instead of iterating over the python object which is probably 1000x slower.