![](/img/trans.png)
[英]Optimizing my Cython/Numpy code? Only a 30% performance gain so far
[英]Cython, invoking shell comand. Performance gain
我的問題很簡單。 使用 Cython 與純 Python 調用 shell 命令或操作系統上存在的任何其他二進制可執行文件有什么好處?
而不僅僅是os.system()
? 並不真地。
os.system()
的實現基本上是(刪除了一些宏):
static long
os_system_impl(PyObject *module, const Py_UNICODE *command)
{
long result;
if (PySys_Audit("os.system", "(u)", command) < 0) {
return -1;
}
result = _wsystem(command);
return result;
}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.