I know that I can use different classes of containers in STL, but it is too expensive and expensive for this purpose.
We have more than 1M + users online, and for each user we need to support 8 unrelated 32-bit data elements. The goal is to
- find if the item exists in the list,
- if not, insert. Delete the old entry if it is full.
Brute Force's approach will be to maintain the last pointer to the record and repeat (starting with 8 elements), but I'm looking for materials for better analysis and implementation.
Look at some interesting suggestions in terms of design and algorithm.
source
share