From: Ville-Pertti Keinonen <will@exomi.com>
To: Matt Gushee <mgushee@havenrock.com>
Cc: caml-list@pauillac.inria.fr
Subject: Re: [Caml-list] Performance problem
Date: Thu, 15 May 2003 01:13:48 +0300 [thread overview]
Message-ID: <55DB7CE4-8659-11D7-9845-000393863F70@exomi.com> (raw)
In-Reply-To: <20030514210332.GA27927@swordfish>
> 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
next prev parent reply other threads:[~2003-05-14 22:13 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-05-14 21:03 Matt Gushee
2003-05-14 22:13 ` Ville-Pertti Keinonen [this message]
[not found] ` <20030514223956.GB27927@swordfish>
2003-05-14 22:41 ` Matt Gushee
2003-05-15 7:57 ` Xavier Leroy
2003-05-15 10:53 ` Michal Moskal
2003-05-14 23:13 ` Matt Gushee
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=55DB7CE4-8659-11D7-9845-000393863F70@exomi.com \
--to=will@exomi.com \
--cc=caml-list@pauillac.inria.fr \
--cc=mgushee@havenrock.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox