|
![](/i/fill.gif) |
"Warp" <war### [at] tag povray org> wrote in message
news:3a87d2dd@news.povray.org...
> Chris Huff <chr### [at] mac com> wrote:
>
<sniped stuff about dynamically allocated arrays and linked lists>
>
> And it's not a clumsy solution. It's a clean and smart solution. Using
> a (hand-coded) dynamic array is the clumsy solution.
>
JPDA[1] - How is hand-coding a list any more clumsy and any less clean
and smart that hand coding a dynamic array, exactly ?
All a linked list is is a fancy dynamic array (in fact there's probably
more work (and, therefore, more chance of screwing something up) in hand
writing a linked list - the dynamic array just needs to keep track of the
current used and max sizes, a linked list requires maintaining previous
and/or next node pointers).
The only benefit you get with a linked list is improved random access
speeds.
--
Scott Hill.
NC Graphics (Cambridge) Ltd.
http://www.ncgraphics.co.uk
[1] JPDA - Just Playing Devils Advocate.
Post a reply to this message
|
![](/i/fill.gif) |