guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Stupid module and pregexp questions


From: Robert Uhl
Subject: Re: Stupid module and pregexp questions
Date: 29 Apr 2003 22:38:26 -0600
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/21.2

MJ Ray <address@hidden> writes:
>
> > That's useful for some things (when the developer writes the
> > regexps), but for others it's not so good, e.g. when the _user_
> > writes the regexps.  The user probably wants whatever he's locally
> > used to...
> 
> Basic, Extended, Perl, ... this probably is general, not just ours.

Granted.  But it seems to me that introducing Yet Another Regexp Scheme
is not the way to solve things.  I'd use the native facility and let
scripts be non-portable; hopefully the friction would cause the native
libraries to be made more uniform.  I'll admit to a touch of sunny
optimism, though:-)

> > And then, of course, there's the issue of speed.  Regexps are used
> > for enough processing that IMHO they must be matched by compiled,
> > not interpreted, code or they risk being unacceptably slow.  [...]
> 
> Compiled code is just interpreted code at a different level, surely?
> A good optimisation will often beat dropping down levels, and scheme
> allows easier optimisation while avoiding some typical errors.  Do the
> minimum directly in C, IMHO.

Oh, of course.  OTOH, one of the things I feel (and I could very well be
quite incorrect) is that sometimes folks ignore the constant factors in
O() issues.  That is, it can very well be that O(n^2) is faster than
O(n) when the latter is interpreted and the former compile, for small
n.  N is often small, which is the problem.  Obviously the ideal is for
all code to be compiled and run as close to the machine as possible, and
obviously Scheme can do that.

A guile compiler would go most of the way toward resolving my own
objections.  The overhead of using a compiled Lisp vs. a compiled C in
this day and age is, in most cases, pretty close to negligible.

-- 
Robert Uhl <address@hidden>
It is the day of Resurrection, let us be radiant for the feast, and let
us embrace one another.  Let us say: `Brethren,' even to them that hate
us, let us forgive all things on the Resurrection, and thus let us cry
out: Christ is risen from the dead, trampling down death by death, and
on those in the tombs bestowing life.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]