[Cython] How to improve the performance when doing string/unicode replace and search?

Yunfan Jiang jyf1987 at gmail.com
Wed Mar 30 05:33:12 CEST 2011


hi, i used to ask some string process question here, and found  a bug, it
seems you guys fix the bug but not use it

and this time , my problem is about the performance,
i need to wrote  a filter which search sorts of keywords in the target
string , and stop if matched,
this act require unicode input/output  , so i wrote a trie like module to
done it, it works ,but i found its too slower than using regex module
so could you guys give some tips on string process performance?

-- 
ME = {
   "name": [ "jyf", "yunfan", "wuxian" ],
   "im": {
        "gtalk": "jyf1987 at gmail.com",
        "msn": "geek42 at live.cn"
          },
   "job": "python engineer",
   "site": "http://hi.baidu.com/jyf1987",
   "interested":  {
       "tech": [ "linux", "python", "lua", "php", "html5", "c", "nosql"],
       "history": ["chinese history", "global history"],
       "SF": [ "hard SF", "Thought experiment" ],
       "music": [ "New Age", "Chinese old theme", "Electronic music",
"Strange Music :}"]
     }
 }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/cython-devel/attachments/20110330/e8e1df04/attachment.html>


More information about the cython-devel mailing list