Performance evaluation of recursive vs iterative algorithms in memory-constrained environments

Read full text
Authors: Johanna Klein
Cited by: 0

Abstract

Recursive and iterative algorithms represent two fundamental paradigms for expressing computation, yet their performance characteristics diverge significantly under constrained memory conditions. In modern embedded systems, mobile devices, and edge computing platforms, limited stack space, restricted heap allocation, and strict energy budgets amplify these differences and make algorithmic choice critical. This research presents a systematic performance evaluation of recursive and iterative implementations across representative algorithmic tasks, including traversal, search, and numerical computation, under explicitly defined memory constraints. Execution time, peak memory consumption, stack utilization, and failure rates due to stack overflow or heap exhaustion are analyzed using controlled experimental setups. The methodology combines analytical complexity assessment with empirical benchmarking on memory-limited environments to capture both theoretical and practical behavior. Results demonstrate that while recursive algorithms often offer superior code clarity and modularity, they incur higher stack usage and increased overhead from function calls, leading to degraded performance or instability when memory is scarce. Iterative counterparts consistently exhibit lower memory footprints and more predictable execution profiles, particularly for deep or unbounded input sizes. However, the findings also reveal that tail-recursive optimizations and compiler-level transformations can narrow the performance gap in specific cases. The research further identifies thresholds beyond which recursion becomes infeasible without optimization or manual stack management. By quantifying these trade-offs, the paper provides evidence-based guidance for selecting algorithmic strategies in memory-constrained systems. The results are intended to support developers, educators, and system designers in making informed decisions that balance readability, maintainability, and performance reliability in resource-limited computing environments. Such guidance is increasingly relevant as software complexity grows and deployment contexts diversify, demanding robust algorithms that fail gracefully, conserve resources, and remain verifiable under stress while meeting real-time constraints and long-term maintainability expectations across academic, industrial, and safety-critical domains worldwide where predictable behavior under limitation is a primary engineering requirement today.

Fields of Study & Subjects

Parallel Computing and Optimization Techniques Distributed and Parallel Computing Systems Logic programming and type systems

Publication details

Journal / source
International Journal of Computing Programming and Database Management
Volume
7
Issue
1
Pages
26–30
Publication date
1 January 2026