help-flex
[Top][All Lists]
Advanced

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

Re: Locations suggest -- we're stupid


From: Nikos Balkanas
Subject: Re: Locations suggest -- we're stupid
Date: Mon, 7 Jan 2002 16:43:58 +0200

----- Original Message -----
From: Hans Aberg <address@hidden>
To: Akim Demaille <address@hidden>
Cc: Nikos Balkanas <address@hidden>; John W. Millaway
<address@hidden>; <address@hidden>
Sent: Monday, January 07, 2002 2:14 PM
Subject: Re: Locations suggest -- we're stupid


> At 11:57 +0100 2002/01/07, Akim Demaille wrote:
> >Nikos> My point is that we have much better knowledge to track errors
> >Nikos> based on patterns than flex. Based on that knowledge we can be
> >Nikos> much faster than flex can ever be. I enjoy flex's blazing
> >Nikos> speed. Let's not make it top heavy. Sure it's compile time
> >Nikos> options. I would hate to see some of this spill into the
> >Nikos> executable.
> >
> >Exactly.  Featurism is bad.  This thread should never have started.
> >We know better that Flex will ever.  All we need is a means to achieve
> >our goals.  This is already the case.
>
> Does this mean that you think that Flex's implementation of line numbers
> should not be fixed so that it can be used instead of the very complicated
> workaround user code that you proposed?
>
> Is it not simpler for the diehards to simply not use the improved, more
> efficient, features of the future, rather than telling people to not
> discuss how to improve things?
>
> After all, it seems that the reason that your code is faster than Flex's
is
> that the latter imposes REJECT code on line numbers. So if that is
removed,
> and becomes faster than your code, should that then not be used, because
it
> is better to write complicated and slower user code?
>
>   Hans Aberg
>
>
>
> _______________________________________________
> Help-flex mailing list
> address@hidden
> http://mail.gnu.org/mailman/listinfo/help-flex
>
>

Hi Hans,

I am not a diehard. I do not write slow user code. A lineno++ instruction
doesn't make for slower user code. Flex patterns are much faster than if
statements, because flex uses tables. The exact code you wrote (thanks) is
pretty identical except for the symbols that I used. It requires an if
statement for every char in yytext. It is slower on theoritical grounds
because it scans once more yytext. This delay is above and beyond any REJECT
code. And it is measurable.

Furthermore the if (do_yylineno) statement eats up processing at every
pattern, in runtime. I wished that if new features are implemented they are
handled with precompiler statements (#ifdef do_yylineno ...) so that they do
not penalize whoever doesn't use them. My suspicion is that they will
propably be implemented runtime and hog flex down.

Lastly, let's not forget flex's roots: Unix. In Unix there aren't many
editors that support columns. Unix is not for fancy features. I know
CodeWarrior and it is a very fine compiler for Windows or Mac. Its
philosophy is fine for gui environments. So what next? Make flex gui? I
believe strongly in the KISS philosophy. It makes for faster, leaner, and
more maintainable tools.

Please make a strong case for the features you suggest for Unix. And keep
flex lean and mean. If you want please let's continue this discussion
privately.

Nikos





reply via email to

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