Finding most frequent element in std::vector?

J

Joshua Maurice

Wrong.  Take a look athttp://www.i42.co.uk/stuff/vecarray.htmwhich shows a
performance gain of a stack based container over std::vector of anywhere
between 22% and 44% depending on how std::vector is being used for a
particular use-case (push_back) and compiler (VC++, optimizing for speed)..

I assume you accept that VC++ is a halfway decent optimizing compiler? :)

Sorry, I meant "built in dynamically allocated array" vs std::vector.
Obviously a stack based vector will outperform a std::vector because
of the extra cost of malloc aka operator new.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,777
Messages
2,569,604
Members
45,229
Latest member
GloryAngul

Latest Threads

Top