POV-Ray : Newsgroups : povray.advanced-users : Limited line-of-sight test? : Re: Limited line-of-sight test? Server Time
15 May 2024 06:35:34 EDT (-0400)
  Re: Limited line-of-sight test?  
From: clipka
Date: 31 Jul 2015 14:18:50
Message: <55bbbc0a$1@news.povray.org>
Am 31.07.2015 um 17:10 schrieb Cousin Ricky:

> It seems that the complexity of the SDL makes more of a difference than
> the complexity of the underlying calculation, at least in this case.

Absolutely. As a general rule of thumb, the number of tokens processed 
is the bottleneck, no matter what you do with SDL. (And remember that 
SDL is an entirely interpreted language; no compilation done at all, so 
tokens in loops are processed again and again and again.)

Unless you frequently call macros defined in a different source file. 
Such macro calls are even significantly more expensive.

For heavy math, functions can be a way out, as those are parsed only 
when defined.

> This now has me wondering what an LR(k) parser would do for POV-Ray
> parse times.

No need to dig deep into compiler theory - anything that's not a naive 
interpreter, but does /some/ level of compilation instead, would be a 
huge step forward ;)

POV-Ray's parser was fine as long as POV-Ray scene files were indeed 
just plain scene descriptions. But the approach has become inadequate 
ever since macros and loops were introduced.


Post a reply to this message

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