Do you have a small fixed amount of data with known names and types? Then you may want a mutable struct. Do you have a large amount of data with variable names and either unknown type or all the same type? Then you may want a dictionary. Mutable structs are also much smaller and more efficient than dictionaries. There are certainly cases where you could use either one.
Related topics
| Topic | Replies | Views | Activity | |
|---|---|---|---|---|
| When to use a Dictionary versus a Struct in Julia? | 3 | 4758 | May 6, 2020 | |
| When should I choose a struct, mutable struct, Dict, named tuple or DataFrame? | 17 | 8542 | August 27, 2021 | |
| Alternatives to Dictionaries in Julia | 10 | 1828 | February 20, 2023 | |
| When to use mutable structs? | 1 | 651 | September 28, 2024 | |
| Performance of array of arrays vs. dictionaries when accessing and manipulating data structures | 5 | 2520 | March 14, 2022 |