Programming Data Structures for Large-Scale Desktop Simulations of Complex Systems
Abstract
The investigation of complex systems requires running large-scale simulations over many temporal iterations. It is therefore important to provide efficient implementations. The present study borrows philosophical concepts from Gilbert Simondon to identify data structures and algorithms that have the biggest impact on running time and memory usage. These are the entity $e$-tuple $\mathcal{E}$ and the intertwined update function $\phi$. Focusing on implementing data structures in C#, $\mathcal{E}$ is implemented as a list of objects according to current software engineering practice and as an array of pointers according to theoretical considerations. Cellular automaton simulations with $10^9$ entities over one iteration reveal that the object-list with dynamic typing and multi-state readiness has a drastic effect on running time and memory usage, especially dynamic typing as it has a big impact on the evolution time. Pointer-arrays are possible to implement in C# and are more running time and memory efficient as compared to the object-list implementation, however, they are cumbersome to implement. In conclusion, avoiding dynamic typing in object-list based implementations or using pointer-arrays gives evolution times that are acceptable in practice, even on desktop computers.
- Publication:
-
arXiv e-prints
- Pub Date:
- May 2022
- DOI:
- 10.48550/arXiv.2205.04837
- arXiv:
- arXiv:2205.04837
- Bibcode:
- 2022arXiv220504837C
- Keywords:
-
- Computer Science - Data Structures and Algorithms
- E-Print:
- 6 pages, 1 figure, 1 table