Cython based optimization#123
Conversation
This seems to be a small speedup.
Unlike the other branch the tests pass on this one. Benchmark time went down by a third compared to the previous commit. I'm not sure the _c functions are necessary here - I think that's what cpdef functions are for, but I had difficulty getting them working. Will need to give that another look.
Didn't have any issues this time, and it's cleaner with no clear performance difference.
This should cut execution time by roughly 25% compared to the last commit.
This is not an appropriate use of deepcopy and it's slow.
Minor speed boost.
This provides a notable speedup.
Improvements are relatively minor compared to previous commit, but there is a few seconds of speedup.
Maybe this will make Travis happy?
|
Not sure why Travis still shows this as queued, but if you click through the tests are passing. This is related to #74. |
|
Just to clarify, I would like to go ahead and get this merged if it looks OK. I can add future improvements in a separate PR. Let me know if there are any issues with this. |
|
Thank you very much for the PR! Let me check, then merge and release a new version. |
Missed this before, this is fine.
|
Released as v.0.4.6 (The build failed, not on the PyPI yet https://pypi.org/project/SudachiPy/) |
|
Not sure why we still get errors with Travis CI. |
|
So Travis CI failed to upload to PyPI because now we have Cython build and Platform compatibility tags — Python Packaging User Guide I've manually released the source and the wheels for macOS for now; https://pypi.org/project/SudachiPy/#files |
This incorporates cythonization of some core modules, along with some other changes, for a significant speedup. In my tests it took a benchmark from 35s to 10s.
There's still significant room for improvement, but I wanted to go ahead and get this committed.