sqlite_protobuf icon indicating copy to clipboard operation
sqlite_protobuf copied to clipboard

Compile regular expressions only once

Open rgov opened this issue 6 years ago • 0 comments

Thanks to Scott Lamb for the tip, posted on Hacker News: https://news.ycombinator.com/item?id=19284460

static const std::regex* kPathElementRegexp = new std::regex("...");

This will avoid having to recompile the regular expression on each call.

rgov avatar Mar 01 '19 20:03 rgov