Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

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: 2003-05-14 (22:13)
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 Archives:
Bug reports: FAQ:
Beginner's list: