diff options
author | Ryo Nihei <nihei.dev@gmail.com> | 2021-05-04 17:45:24 +0900 |
---|---|---|
committer | Ryo Nihei <nihei.dev@gmail.com> | 2021-05-04 17:45:24 +0900 |
commit | a0fd0d5a9077947d09777cf7631ca721ffabf9ec (patch) | |
tree | af060dd455d1895676f1ac5c030839560ec3eb6e /driver/lexer.go | |
parent | Add lex mode (diff) | |
download | tre-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