mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-28 02:46:35 +03:00
63fa55089d
This change changes the type of left/right-arc collections from vector[ArcC] to unordered_map[int, vector[Arc]], so that the arcs are keyed by the head. This allows us to find all the left/right arcs for a particular head in constant time in StateC::{L,R}. Benchmarks with long docs (N is the number of text repetitions): Before (using #10019): N Time (s) 400 3.2 800 5.0 1600 9.5 3200 23.2 6400 66.8 12800 220.0 After (this commit): N Time (s) 400 3.1 800 4.3 1600 6.7 3200 12.0 6400 22.0 12800 42.0 Related to #9858 and #10019. |
||
---|---|---|
.. | ||
__init__.pxd | ||
__init__.py | ||
_beam_utils.pxd | ||
_beam_utils.pyx | ||
_state.pxd | ||
_state.pyx | ||
arc_eager.pxd | ||
arc_eager.pyx | ||
ner.pxd | ||
ner.pyx | ||
nonproj.pxd | ||
nonproj.pyx | ||
stateclass.pxd | ||
stateclass.pyx | ||
transition_system.pxd | ||
transition_system.pyx |