Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] Performance problem
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Ville-Pertti Keinonen <will@e...>
Subject: Re: [Caml-list] Performance problem
> these figures seem way beyond the pale. There must be a bug either in 
> my
> code or one of the supporting libraries. The only obvious possibilities
> that occur to me are an output buffering problem or some delay in
> interacting with the X display, but I'm not sure how to solve either of
> those. And maybe it's something else entirely. Can anyone explain my
> terrible results?

My guess (without profiling) is that most of the time is being spent 
doing regular expression matching.

Regular expressions can be much slower than you might expect for 
non-trivial cases.  The expression in your program looks particularly 
nasty, since there are a lot of ambiguous cases (whether '-' should 
match '.*' or '-' depends on everything that follows).

You might want to try using Str.split instead.

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners