P
P
Pavel K2019-06-18 00:15:19
Qt
Pavel K, 2019-06-18 00:15:19

What container/methodology can replace Map from JavaScript?

Greetings!
I really want to find an analogue of Map from JavaScript (if I understand correctly):
Qt has QMap, but it is necessary that the keys be without sorting, and the iterator always goes through them in insertion order, and not in the sort order of the key value. QHash is not suitable because of pseudo randomness, and QVector is the same (its empty elements are also taken into account by the iterator + the size will be gigantic if there is even a pair of keys with a large gap between them). In QList, the indexes should simply go in order, without gaps, and it will not be possible to immediately take and insert them in place 42.
Please suggest the best options... PS Performance is important.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Roman, 2019-06-18
@PavelK

As an option, write an analogue yourself or peep the implementation in the js source code of the v8 engine

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question