阅读背景:

记录正则表达式查找匹配所用时间时的记录冲突

来源:互联网 

WHAT I WANTED: I had to see and prove the outcome whether simple regex runned slower than compiled one or not. I decided to generate 100000 random strings, make two regex- one simple and one compiled- and check for a match in this 100000 set of strings. Also, to have many outputs to resolve from, what I did was initially I took all 100000 strings and ran the code and logged the timings, then I took first 80000 strings from the same set and logged the output, then I took first 50000 strings from the same set and logged the output and so on... I had to see and prove the outco




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: