POV-Ray : Newsgroups : povray.general : Feature requests iden() : Re: Feature requests iden() Server Time
8 Aug 2024 22:16:55 EDT (-0400)
  Re: Feature requests iden()  
From: Warp
Date: 28 Nov 2000 09:53:47
Message: <3a23c6fb@news.povray.org>
Chris Huff <chr### [at] maccom> wrote:
:> I think I'd rather see associative arrays a la perl.

: Maybe Warp can implement that as a macro... :-)

  I don't think there's any efficient way of implementing that in the current
povray scripting language.
  The most efficient way (timewise) of implementing an associative array
is using a weighted binary tree. Implementing one in povray is probably a
pain (I can't say the word "impossible" since I have been surprised many
times with things that seemed impossible but they were implemented anyways;
I would, however, say that if it is possible, it's probably slow as h***).

  An extremely slow way of doing it would be just making a dynamic array
(or perhaps a growing string). Would work fine for some tens of items, but
it would be just way too slow for thousands of items. Not worth the
efforts, anyways.

-- 
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):_;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/


Post a reply to this message

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