Improve performance of msg:set_size / msg:set_data for ffi binding.