What is the essential difference between matlab's new built-in data type dictionary and the old containers.Map?

40 visualizzazioni (ultimi 30 giorni)
matlab has introduced a new data type dictionary since R2022b, which is very good. But as far as I know, since R2008b, there are actually similar types of containers.Map, and most of their member functions support the same operations, so I'm curious what the essential differences are? And then what is the recommended context for using each?

Risposta accettata

Steven Lord
Steven Lord il 18 Ott 2022
The Release Notes state as one benefit "In almost all use cases, dictionary performs faster than containers.Map."
You may also want to follow the blog named "The MATLAB Blog". At the end of this blog post @Mike Croucher said "In the next two posts I'll take a deep dive into the different types you can use in dictionaries, including user-defined classes and will also compare the new functionality with the venerable containers.map."

Più risposte (0)

Categorie

Scopri di più su Structures in Help Center e File Exchange

Prodotti


Release

R2022b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by