POV-Ray : Newsgroups : povray.general : Parsing question... : Re: Parsing question... Server Time
5 Aug 2024 18:18:23 EDT (-0400)
  Re: Parsing question...  
From: Warp
Date: 6 Aug 2002 17:50:22
Message: <3d50449e@news.povray.org>
Tim Nikias <tim### [at] gmxde> wrote:
> What is actually easier for POV to parse,
> (Float_Value*2) or (Float_Value+Float_Value)?

  I don't think there's any difference.
  In fact, I think that the former could be faster because a short constant
is probably faster to parse than a long identifier name (with the proper
value lookup involved).

> Does it make a difference? I tend to recall that
> I've learned somewhere that any parser/CPU has
> to do some extra job to break down the "multiply with
> 2" into something it can actually calculate, while
> "add" is very simple and clean to do for a CPU.

  You have probably confused something else with this. There's no practical
difference between addition and multiplication.

-- 
#macro N(D)#if(D>99)cylinder{M()#local D=div(D,104);M().5,2pigment{rgb M()}}
N(D)#end#end#macro M()<mod(D,13)-6mod(div(D,13)8)-3,10>#end blob{
N(11117333955)N(4254934330)N(3900569407)N(7382340)N(3358)N(970)}//  - Warp -


Post a reply to this message

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