[Mono-dev] Re: Regular expression performance

Zac Bowling zac at zacbowling.com
Sun Sep 11 20:46:04 EDT 2005


I always wondered how much a benifit you really get from compiled regex 
expresses on .NET. I see an increased time to load compiled regex statements 
but that evens it self out with the complexity of the statements route being 
cached. I guess if you are writting a very complex regex, it helps to go 
ahead and compile them on MS.NET <http://MS.NET>, but it helps only just a 
little that most apps wouldn't benifit but just a little from a speed boost 
there.

Zac B. 

On 9/11/05, Thomas Harning Jr. <harningt at gmail.com> wrote:
> 
> Thomas Harning Jr. wrote:
> ...
> > I ran these tests with the "compiled" regexes on Mono.
> > Strange enough... I re-ran the regexes non-compiled w/ the same
> > performance stats. Does Mono not have compiling yet???
> ...
> It looks like Mono can't compile Regexes yet. However... I ran the
> tests on Windows and the performance was basically the same, lol.
> So... I wonder what Regular expressions' deal is with multiple
> options to match against.
> I made a custom little attempt at optimizing the string searching so
> that it could search for multiple patterns at the same time (with
> the IndexOfAny(char, ...) function). It was a bit slower than
> completely searching through the string for the patterns. W/ the
> indexofany, I got the first character of the things to search for so
> as to see if any matches were possible as it went through. And if
> it found one, I ran a loop through the patterns to see if the whole
> pattern matched. This sounds like it would work good, since I'm
> greatly limiting the # of times characters are matched against...
> but in my implementation it doesnt.
> 
> Guess it might be best to search for each little character pattern,
> then try to grab out the data after.
> --
> Thomas Harning Jr.
> 
> 
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
> 
> 
> 
> 


-- 
Zac Bowling
http://www.zacbowling.com
---

I support Mozilla Firefox.
http://www.spreadfirefox.com/?q=affiliates&id=12079&t=1
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20050911/d9148581/attachment.html 


More information about the Mono-devel-list mailing list