[Qt-interest] New container class needed in Qt

Mandeep Sandhu mandeepsandhu.chd at gmail.com
Wed Oct 19 06:58:09 CEST 2011


On Tue, Oct 18, 2011 at 11:13 PM, John Weeks <john at wavemetrics.com> wrote:
>
> On 18-Oct-2011, at 12:54 AM, Mandeep Sandhu wrote:
>
> My data set is not very big ( < 100 items)
>
> With so few items, a simple list with look-ups by walking the list might
> have acceptable performance. Maybe it's O(n), but it's n*(very fast) instead
> of possibly constant*(not as fast) for a hash container.
> Regards, John Weeks
>

True. Performance is really not an issue with such few items. It's
just that code-wise it looked a little 'iffy' to iterate the list and
get the right element.

Thanks all for your inputs. In the future if I need to handle large
data sets, then the List+Hash solution will be handy (maybe we can
have a new QOrderedMap/Hash container in some later Qt release, if
m,ore ppl want such a functionality?).

Regards,
-mandeep



More information about the Qt-interest-old mailing list