[Qt-interest] Qt Containers (or: why I must use STL)
Yves Bailly
yves.bailly at sescoi.fr
Tue Oct 13 08:28:39 CEST 2009
Thiago Macieira a écrit :
> Em Segunda-feira 12. Outubro 2009, às 23.36.43, Stephen Bryant escreveu:
>> Actually, it's worse than that: the reserve() and resize() methods
>> take a signed int. Signed? That's just plain silly!
>> On x86_64, int is still only 4 bytes, so despite masses
>> of memory, I can never have a byte array larger than 2GB.
>
> You mean 2 billion elements. In a QList, that's at least 16 GB of memory, for
> the array alone.
Just for the record... QList is a poor choice when managing huge amount of
items (horrible perfomance, overhead), so I assume Stephen was refering to
QVector. And for your information, I personnaly currently develop on a
machine having 20GB of RAM (yes, RAM) and I have already seen the need to
hold about 2500000000 items.
Yes, web browsers, database explorers and funny toys are not the only apps
that can be worked on by Qt users, there are also highly scientific or
industrial ones. See milling for example.
So I personaly agree with what Stephen wrote.
Regards,
--
/- Yves Bailly - Software developper -\
\- Sescoi R&D - http://www.sescoi.fr -/
"The possible is done. The impossible is being done. For miracles,
thanks to allow a little delay."
More information about the Qt-interest-old
mailing list