dlclark / regexp2

A full-featured regex engine in pure Go based on the .NET engine
MIT License
987 stars 83 forks source link

CPU is too high, how to reduce CPU, Pprof shows as follows #41

Closed zhoadi closed 3 years ago

zhoadi commented 3 years ago

1.31mins 54.98% 54.98% 1.31mins 55.00% github.com/dlclark/regexp2/syntax.CharSet.CharIn 0.25mins 10.34% 65.32% 0.25mins 10.36% github.com/dlclark/regexp2.(runner).forwardcharnext 0.19mins 8.09% 73.41% 1.75mins 73.45% github.com/dlclark/regexp2.(runner).findFirstChar

dlclark commented 3 years ago

Hello! Can you please attach a benchmark example of the issue?

Thanks!