[ale] Linux kernel

Jon "maddog" Hall jon.maddog.hall at gmail.com
Thu Nov 16 07:43:09 EST 2023


Steve,

Different compilers are written in different ways, but in general you are
right.   Compared to the lexical analysis, syntactical analysis and
optimization stages (ESPECIALLY OPTIMIZATION) the tokenization stage (which
includes removing comments) is a blip in the timeline of compilation.

I will say that comments DID have a real impact when compilers were reading
in source code on paper tape on an ASR-33 Teletype, but that was the last
time I even considered the issue oft compilation time being slowed down by
comments.

md

On Wed, Nov 15, 2023 at 10:08 PM Steve Litt via Ale <ale at ale.org> wrote:

> Jon "maddog" Hall via Ale said on Wed, 15 Nov 2023 19:28:38 -0500
>
> >The other thing that surprised me was the passage that said "Comments
> >just slow down the compilation".
> >
> >Paaaaleese!  Even the heaviest commented source code on a compiled
> >program would be a breeze for the compiler to handle.  This excuse is
> >fake news.
>
> Maddog, is the first step, before lexical analysis, replacing all space
> characters and newlines with tokens so the lexical analyzer sees the
> program as a single string?
>
> If that's the case, I can see where // to the next linefeed and /* to
> the next */ would be very fast.
>
> Thanks,
>
> SteveT
>
> Steve Litt
>
> Autumn 2023 featured book: Rapid Learning for the 21st Century
> http://www.troubleshooters.com/rl21
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> https://mail.ale.org/mailman/listinfo/ale
> See JOBS, ANNOUNCE and SCHOOLS lists at
> http://mail.ale.org/mailman/listinfo
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.ale.org/pipermail/ale/attachments/20231116/ab262ed9/attachment.htm>


More information about the Ale mailing list