POV-Ray : Newsgroups : povray.general : A couple parser performance issues/optimizations. : Re: A couple parser performance issues/optimizations. Server Time
2 May 2024 17:24:20 EDT (-0400)
  Re: A couple parser performance issues/optimizations.  
From: Bald Eagle
Date: 7 Oct 2017 19:05:01
Message: <web.59d95c8e31ae2f125cafe28e0@news.povray.org>
William F Pokorny <ano### [at] anonymousorg> wrote:
> I've borrowed some code Bill Walker (Bald Eagle) posted in the
> "Isosurface and f_spiral - bug or feature?"  thread started by Ronkar to
> demonstrate a couple of parser performance issues/user-optimizations.
>
> 1) Comments in inner loops are costly. 2) Functions are often much
> faster than macros.

I would not have guessed that.  I had always imagined that it bailed out as soon
as it saw //  but I guess not.
Also good to know if
Code /* inner comment */  more code... is used in a scene file

> With both, parser performance can be positively affected by how we code.

Yes, I try to learn and apply good coding practices as often as possible - which
sometimes isn't that often.
I had been trying to query why a polynomial is [supposed to be] much faster than
an isosurface or parametric - I have ideas, but no "source code explanation"

>   Perhaps, the parser code itself can better handle comments. Details
> and sample code are part of my comment today to the github issue:
>
> https://github.com/POV-Ray/povray/issues/313
>
> Bill P.


BTW,
Using 3.7.1-beta.8

#version 3.71;
#declare StartTime = now();

Gave me a "Need a semicolon" errors.
Bug Report?


Post a reply to this message

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