yakra / DataProcessing

Data Processing Scripts and Programs for Travel Mapping Project
0 stars 0 forks source link

regex redux #121

Open yakra opened 4 years ago

yakra commented 4 years ago

Was the reason regexes were so unbearably slow because I was continually creating & destroying regex objects, hundreds of thousands of times over?

What if I were to create const regexes at the beginning of the program, and then refer to those as needed?

Datacheck functions hand-coded for a particular purpose are probably still faster, but nonetheless...

yakra commented 2 years ago

What if I were to create const regexes at the beginning of the program, and then refer to those as needed?

compile-time regular expressions via constexpr