aboutsummaryrefslogtreecommitdiff
path: root/driver/lexer.go
diff options
context:
space:
mode:
authorRyo Nihei <nihei.dev@gmail.com>2021-05-04 17:45:24 +0900
committerRyo Nihei <nihei.dev@gmail.com>2021-05-04 17:45:24 +0900
commita0fd0d5a9077947d09777cf7631ca721ffabf9ec (patch)
treeaf060dd455d1895676f1ac5c030839560ec3eb6e /driver/lexer.go
parentAdd lex mode (diff)
downloadtre-a0fd0d5a9077947d09777cf7631ca721ffabf9ec.tar.gz
tre-a0fd0d5a9077947d09777cf7631ca721ffabf9ec.tar.xz
Improve performance of the symbolPositionSet
When using a map to represent a set, performance degrades due to the increased number of calls of runtime.mapassign. Especially when the number of symbols is large, as in compiling a pattern that contains character properties like \p{Letter}, adding elements to the set alone may take several tens of seconds of CPU time. Therefore, this commit solves this problem by changing the representation of the set from map to array.
Diffstat (limited to 'driver/lexer.go')
0 files changed, 0 insertions, 0 deletions