[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: associative array

From: Juan Pablo Carbajal
Subject: Re: associative array
Date: Thu, 26 Mar 2020 21:13:08 +0100

> Are there more efficient ways to build and update an associative array?
What is the value associated with the key? How flexible you are?
For numeric values, you can do this with 2 arrays (value and key, keys
might be a string array), or 1 array and 1 cell.
The cost of operations in keys inherit the cost of string arrays or
cells. The cost of operations in values inherit the costs of numeric

You can create a very simple class to put the two things together, but
that's just nice API, nothing else.

I would expect that struct are close to std::map in their complexity
[1], N^2 would be pretty far away from that.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]