PERF: Move Period class and related functions to Cython module by blbradley · Pull Request #9440 · pandas-dev/pandas (original) (raw)

I propose that Period should be a more basic type, like Timestamp.

I wanted to start with implementing frequencies with multipliers (see issue #7811), but the code for Period was all over the place. So, I moved all code directly related to Period to a Cython module. Changed a bit of the logic to make calls from Cython instead of Python to get rid of some Python dependencies. However, the 'meat' of Period is still there. I will be refactoring Period to use Cython over the next week or two.

I've only done a bit of performance testing, but the results from moving Period are good so far without any real Cython refactoring.

Note: First commit in this stream is from #9415 because I needed that bug fixed to make this work.

Comments most welcome!