goodmami / pe

Fastest general-purpose parsing library for Python with a familiar API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to go beyond pure Python?

goodmami opened this issue · comments

The goal, particularly for the machine parser, is to use a faster platform for parsing than standard Python, while still being a Python module. It's not clear what is the best option, in terms of speed and efficiency, startup time, availability/portability, maintainability, licensing, etc. Here are some options:

  • PyPy -- the nice thing here is that nothing is really required besides using PyPy
  • Cython -- works well with CPython, can get very fast
  • CPython extension modules -- even more control, but more expertise needed
  • llvmlite -- maybe good for a state machine, but it's not clear how to work with string data instead of numbers

I recently added machine.pyx as a Cython solution. It is now nearly as fast as my old textpy implementation, but without the recursion limit.

I think this can be closed now.