Python dictionaries vs C++ std:unordered_map (cython) vs cythonized python dict

岁酱吖の 提交于 2019-12-05 08:41:14

My timings from your code (after correcting that python *10 indent :) ) are

Cython CPP book notation
21.617647969018435
Cython CPP python notation
21.229907534987433
Cython python notation
24.44413448998239
Pure python
23.609809526009485

Basically everyone is in the same ballpark, with a modest edge for the CPP versions.

Nothing special about my machine, the usual Ubuntu 14.10, 0.202 Cython, 3.42 Python.

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