Skip to content
This repository was archived by the owner on Mar 9, 2023. It is now read-only.

Cython based optimization#123

Merged
sorami merged 17 commits intoWorksApplications:developfrom
polm:cython-again
Jun 10, 2020
Merged

Cython based optimization#123
sorami merged 17 commits intoWorksApplications:developfrom
polm:cython-again

Conversation

@polm
Copy link
Contributor

@polm polm commented Jun 3, 2020

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.

polm added 16 commits June 2, 2020 23:38
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.
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?
@polm
Copy link
Contributor Author

polm commented Jun 4, 2020

Not sure why Travis still shows this as queued, but if you click through the tests are passing.

This is related to #74.

@polm
Copy link
Contributor Author

polm commented Jun 10, 2020

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.

@sorami sorami self-requested a review June 10, 2020 08:59
@sorami
Copy link
Collaborator

sorami commented Jun 10, 2020

Thank you very much for the PR! Let me check, then merge and release a new version.

Missed this before, this is fine.
@sorami sorami merged commit 620f7c3 into WorksApplications:develop Jun 10, 2020
@sorami
Copy link
Collaborator

sorami commented Jun 10, 2020

Released as v.0.4.6
https://github.com/WorksApplications/SudachiPy/releases/tag/v0.4.6

(The build failed, not on the PyPI yet https://pypi.org/project/SudachiPy/)

@sorami
Copy link
Collaborator

sorami commented Jun 10, 2020

Not sure why we still get errors with Travis CI.

@sorami
Copy link
Collaborator

sorami commented Jun 11, 2020

So Travis CI failed to upload to PyPI because now we have Cython build and bdist_wheel adds the platform tag linux_x86_64 which they don't accept.

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

@sorami
Copy link
Collaborator

sorami commented Jun 11, 2020

#125

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants