POV-Ray : Newsgroups : povray.off-topic : Games programmers : Re: Games programmers Server Time
10 Oct 2024 13:14:18 EDT (-0400)
  Re: Games programmers  
From: Nicolas Alvarez
Date: 11 Sep 2008 22:48:18
Message: <48c9d872@news.povray.org>
Warp wrote:
>> (And that you can *query the size* of an array?)
> 
>   Getting the size of a vector, string, deque and binary tree is O(1).
> (For doubly-linked lists it's not guaranteed.)

And libstdc++ developers decided to keep list::size as O(n) as a tradeoff
(otherwise mutating operations would have to keep the size up-to-date,
making *them* slower).


Post a reply to this message

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