POV-Ray : Newsgroups : povray.general : A couple parser performance issues/optimizations. : Re: A couple parser performance issues/optimizations. Server Time
2 May 2024 23:34:11 EDT (-0400)
  Re: A couple parser performance issues/optimizations.  
From: clipka
Date: 11 Oct 2017 07:22:53
Message: <59ddff0d$1@news.povray.org>
Am 11.10.2017 um 12:31 schrieb Bald Eagle:
> "Kenneth" <kdw### [at] gmailcom> wrote:
> For single-line  // comments, though, I would have imagined
>> that all the text on that particular line would BE ignored, as soon as the
>> parser came across a double slash //  Hmm, apparently not.
> 
> I think I initially had that impression, but if you think about it, the parser
> has to look for a NL/CR line ENDING character so that it knows what the next
> line is.
> 
> Why this is so SLOW for the parser to do remains puzzling to me, since I can
> download hundreds of megabytes, use FIND to search 1000+ page PDF's for text, or
> search a whole directory or drive to find that text, and I have a positively
> insane spreadsheet I wrote at work which does I don't even want to think about
> how many _calculations_ .....
> 
> Maybe it's just old, horribly outdated / outmoded coding of the parser.

A search is a simple thing: You only traverse each document once, and
you're done.

A search in a directory is even easier: On a modern computer with
standard settings, you actually only search an index.

Parsing a loop... well, it /could/ be reasonably easy if the parser
pre-processed the content somehow (e.g. discarding any comments,
identifying keywords, and some such), and on each loop iteration only
traversed the pre-processed stuff. Unfortunately, POV-Ray's organically
grown syntax is quite detrimental to such an approach.


> <Gollum> Clipka hates the parser, yes he does, my Precioussssssss  <Gollum>

Oh yes, we does, doesn't we, my precioussss? Oh yes, we loathes it!

It's not tasty... it's not scrumptious... no, preciousssss! Not at all
scrumptious! Nassssty parsers!


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.