optimize pack_command with cython