speed improvement for Key_bytes