For #198 and other performance issues, it may be worth seeing if we can Cythonize key parts of the library to improve the performance. It's still not clear yet whether this can work, or if the performance gains will be significant enough to warrant the additional complexity of having non-pure Python parts of the code.