QMS  Admin 
Individual Quote
Home / Latest / Browse / Random >0 / Top 150 / Bottom / Add Quote / Queue / QotW / Search / #
#610 (Image) [ Down (4) Up ] [Submitter: DCoder]

<DCoder1337> apparently the C++ STL documentation explicitly advises against doing what Westwood did
<DCoder1337> "When it is necessary to increase capacity(), vector usually increases it by a factor of two. It is crucial that the amount of growth is proportional to the current capacity(), rather than a fixed constant: in the former case inserting a series of elements into a vector is a linear time operation, and in the latter case it is quadratic."
<AlexB__> so the question is: did westwood know 10 is a constant?

/** context: Westwood's vectors always increase their capacity by 10 **/

Comment: irc.freenode.net#renproj - #define true false

Home / Latest / Browse / Random >0 / Top 150 / Bottom / Add Quote / Queue / QotW / Search / #
Rash Version: 1.2.1-release + DCoder_patch (some ideas inspired by Chirpy!