Test String
7800000 (7.8M Characters)
"abbbcdexfbeczexczczkef111anncdehbzzdezf" * 200000
Very Simple Replace
regex pattern: bc , Replace with : TEST , mine is 2.5x faster
my regex sub 0.140000104904 s 8200000 abbTESTdexfbeczexczczkef111anncdehbzzdezfabbTESTdexfbeczexczczkef111anncde....
python's re sub 0.359999895096 s 8200000 abbTESTdexfbeczexczczkef111anncdehbzzdezfabbTESTdexfbeczexczczkef111anncde....
With Range Matching
regex pattern: [a-z]c , Replace with : TEST , mine is 6x faster
my regex sub 0.453000068665 s 9800000 abbTESTdexfbTESTzeTESTTESTzkef111anTESTdehbzzdezfabbTESTdexfbTESTze....
python's re sub 2.82800006866 s 9800000 abbTESTdexfbTESTzeTESTTESTzkef111anTESTdehbzzdezfabbTESTdexfbTESTze....
With Range Matching + Grouping
regex pattern: ([a-z])(c) , Replace with : AA\2\1BB , mine is 27x faster
my regex sub 0.641000032425 s 11800000 abbAAcbBBdexfbAAceBBzeAAcxBBAAczBBzkef111anAAcnBBdehbzzdezfabbAAcbBB....
python's re sub 17.7969999313 s 11800000 abbAAcbBBdexfbAAceBBzeAAcxBBAAczBBzkef111anAAcnBBdehbzzdezfabbAAcbBB....
Cheers,
Mark
သင္ေကာင္းလွ်င္ ကြ်ႏု္ပ္မဆိုးပါ။ သင္ဆိုးလွ်င္ သင့္ထက္ပိုဆိုးလွ်င္ ဆိုးမည္။
Loading
Subscribe to:
Post Comments (Atom)
က်ေနာ္ဖတ္ေသာ အျခား ဘေလာ့ / ဆိုဒ္မ်ား
-
-
ကိုကိုနဲ့ ကျွန်မရဲ့ ကောင်းကင်2 years ago
-
-
သဟဇာတ ...3 years ago
-
စာေပဆု ၂၀၂၀3 years ago
-
Something about the protection of UNESCO5 years ago
-
Baby Y's birth story6 years ago
-
ပုစြန္ေဘာ့ခ်ိတ္ေၾကာ္6 years ago
-
ဘောင်ခတ်ပါ၊ မသတ်နဲ့ ...7 years ago
-
-
မဂၤလာပါရွင္ ☆彡10 years ago
-
စိတ္အခ်ဥ္ေပါက္ျခင္း11 years ago
-
-
50.1 ဘ၀ထဲ ရြာလည္ၾကသူမ်ား11 years ago
-
-
2010.06.29の愛妻弁13 years ago
-
ၾကည့္မိတဲ့ သတင္း (၄-၃-၂၀၁၁)13 years ago
-
တူမေလးမ်ားနဲ႔ တလတာ..13 years ago
-
Idea August, 201014 years ago
-
ေက်းဇူးတင္လိုက္ပါ14 years ago
-
လက္ဖက္ထမင္းသုပ္15 years ago
-
-
-
-
-
-
-
-
-
1 comment:
is nice to know, your implemtation is faster or better... but, could we see the implementation..?
cheers,
Kp.
Post a Comment