POV-Ray : Newsgroups : povray.general : Optimizing objects : Re: Optimizing objects Server Time
5 Nov 2024 15:51:09 EST (-0500)
  Re: Optimizing objects  
From: ABX
Date: 19 Mar 2003 01:42:46
Message: <ps3g7vstlu2d00i5gi64chgfajivg3g5j3@4ax.com>
On Tue, 18 Mar 2003 17:06:18 EST, "gonzo" <rgo### [at] lansetcom> wrote:
> Does copied CSG use more memory?

yes

> For example, if I have a macro that constructs a CSG object, which would use
> less memory: to call the macro once, then use 20 copies of that object, or
> to call the macro 20 times?

Considering there are no #declarations of objects inside macro then
one call + 20 copies of identifier will use in memory 21 objects
while macro called 20 times will use 20 objects in memory.

Considering that macro internally use #declarations of local objects then macro
will take more memory.

Macro is always less or more slower than assignment from predeclared identifier.

As long as you not make complicated CSGs like trees there should no problem with
hundreds of megabytes.

ABX


Post a reply to this message

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