Comparative Analysis of Arrays and Linked Lists in Python and C#: Impact on Memory Efficiency

Authors

DOI:

https://doi.org/10.55873/rad.v4i2.422

Keywords:

arrays, C#, memory efficiency, data structures, linked lists, programming, Python

Abstract

This article analyzes the impact of arrays and linked lists on memory efficiency in Python and C#. Both structures were implemented and three operations were evaluated on collections of 10,000 elements: middle access, insertion, and deletion. Execution times were measured using timeit in Python and Stopwatch in C#, complemented with an estimation of memory consumption. Statistical analysis through a two-factor ANOVA was applied to contrast the effect of the programming language and the data structure. The results show that arrays are systematically more efficient than linked lists in both platforms. In central access, arrays exhibited nearly constant execution times (0.0010 ms in Python and 0.0012 ms in C#), clearly outperforming linked lists due to their contiguous memory organization. They also showed superior performance in intermediate insertions and deletions. The ANOVA results indicated that the programming language does not have a statistically significant effect on execution times (p > 0.05), whereas the data structure is the main determinant of performance; therefore, arrays represent the most efficient option in scenarios dominated by random access and intermediate operations, regardless of the programming language.

Downloads

Download data is not yet available.

References

Aoe, J., Morimoto, K., & Sato, T. (1992). An efficient implementation of trie structures. Software: Practice and Experience, 22(9), 695–721. https://doi.org/10.1002/spe.4380220902

Bae, S. (2019). Linked Lists. In JavaScript Data Structures and Algorithms (pp. 179–192). Apress. https://doi.org/10.1007/978-1-4842-3988-9_13

Banerjee, A., & Kumar, P. K. (2022). A New Vista of Performing Insertion and Deletion in Linked Lists. International Journal of Computer Science and Mobile Computing, 11(7), 83–97. https://doi.org/10.47760/ijcsmc.2022.v11i07.008

Chen, Z., Chen, L., Yang, Y., Feng, Q., Li, X., & Song, W. (2024). Risky Dynamic Typing-related Practices in Python: An Empirical Study. ACM Transactions on Software Engineering and Methodology, 33(6), 1–35. https://doi.org/10.1145/3649593

Extending Python Using NumPy. (2019). In Python® Machine Learning (pp. 19–38). Wiley. https://doi.org/10.1002/9781119557500.ch2

Fetaji, M., Ebibi, M., & Fetaji, B. (2012). Measuring Algorithms Performance in Dynamic Linked List and Arrays. TEM Journal, 98–103. https://doi.org/10.18421/TEM12-06

Gonzalez, A. J. (2020). Dynamically-Allocated Memory and Linked Lists. In Computer Programming in C for Beginners (pp. 157–173). Springer International Publishing. https://doi.org/10.1007/978-3-030-50750-3_11

Lokeshwar, B., Zaid, M. M., Naveen, S., Venkatesh, J., & Sravya, L. (2022). Analysis of Time and Space Complexity of Array, Linked List and Linked Array(hybrid) in Linear Search Operation. 2022 International Conference on Data Science, Agents & Artificial Intelligence (ICDSAAI), 1–6. https://doi.org/10.1109/ICDSAAI55433.2022.10028872

Morita, K. (2004). Fast and compact updating algorithms of a double-array structure. Information Sciences, 159(1–2), 53–67. https://doi.org/10.1016/S0020-0255(03)00189-0

Mrena, M., Varga, M., & Kvassay, M. (2022). Experimental Comparison of Array-based and Linked-based List Implementations. 2022 IEEE 16th International Scientific Conference on Informatics (Informatics), 231–238. https://doi.org/10.1109/Informatics57926.2022.10083495

SYEROV, Y., & TERLETSKA, K. (2025). ANALYZING THE INNOVATIVE ENGINEERING TECHNOLOGY STACK. Herald of Khmelnytskyi National University. Technical Sciences, 349(2), 89–93. https://doi.org/10.31891/2307-5732-2025-349-12

Array and linked list

Published

2025-07-25

How to Cite

Alarcón-Sucasaca , A., & Gallegos-Ramos , N. A. (2025). Comparative Analysis of Arrays and Linked Lists in Python and C#: Impact on Memory Efficiency. Revista Amazonía Digital, 4(2), e422. https://doi.org/10.55873/rad.v4i2.422

Issue

Section

Original articles

Similar Articles

1 2 3 4 > >> 

You may also start an advanced similarity search for this article.