UniversalDependencies / tools

Various utilities for processing the data.
GNU General Public License v2.0
205 stars 44 forks source link

validator: precompiling some regexes cuts runtime in half #95

Closed nschneid closed 1 year ago

nschneid commented 1 year ago

I profiled validator.py with SnakeViz and found some low-hanging fruit for optimization: regex compilation in several functions.

Benchmarked on EWT on my system, this change cuts runtime from 33.5s to 14.8s.