This repository was archived by the owner on Mar 9, 2023. It is now read-only.
Tags: WorksApplications/SudachiPy
Tags
Cython based optimization (#123) * Remove unecessary deep copy * Add lru_cache on get_word_info * Add lru_cache to get_word_info This seems to be a small speedup. * Basic Cythonization 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. * Use cpdef functions Didn't have any issues this time, and it's cleaner with no clear performance difference. * Move build_lattice to Cython, intern some slow parts This should cut execution time by roughly 25% compared to the last commit. * Don't use deepcopy This is not an appropriate use of deepcopy and it's slow. * Add cython to setup_requires * Fix setup.py * Make INHIBITED_CONNECTION literal Minor speed boost. * Bring the matrix into the lattice building This provides a notable speedup. * Various cythonizations Improvements are relatively minor compared to previous commit, but there is a few seconds of speedup. * Inline function for small speed boost * Change import order, make lru cache size explicit Maybe this will make Travis happy? * Add a build command * Use INT_MAX * Remove comment Missed this before, this is fine.
PreviousNext