Cythonize python dictionary object

孤街浪徒 提交于 2021-01-25 07:17:35

问题


I am using cython to improve the performance of the python functions. Basically i can improve performance only in dictionary operations. So i was trying to search for any dictionary written in c, I found that cython itself contains a .pxd file which is basically wrapper for .h file at "Cython/includes/cpython". My question is if i directly use cimport dict,how to include the above mentioned path while compiling?

If i use this dict.pxd will i get any improvement in performance ? I attached the code from dict.pxd

https://github.com/cython/cython/blob/master/Cython/Includes/cpython/dict.pxd

来源:https://stackoverflow.com/questions/44809147/cythonize-python-dictionary-object

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!