Python高速memcpy

问题描述 投票:-1回答:1

我正在尝试用Python进行高速memcpy。我使用ctypes库,该库允许我与C程序进行交互。

我按照以下步骤操作:

  1. 我得到了内存地址
  2. 我得到数据的长度
  3. 我使用ctypes的函数memmove或string_at

结果是正确的,但我需要更高的速度。没有使用C的方法,有没有更快的方法?

谢谢。

python c memory-management ctypes high-speed-computing
1个回答
0
投票

我在这篇文章中找到了一个解决方案:

How to read from pointer address in Python?

以张汉娜的回答。

© www.soinside.com 2019 - 2024. All rights reserved.