ADVERTISEMENT

Home|Journals|Articles by Year|Audio Abstracts
 

Research Article



Unifying Algorithmic Performance: Insertion Sort Across Diverse Programming Paradigms

Md Sydul Islam,Pranto Halder.



Abstract
Download PDF Cited by 0 ArticlesPost

Abstract— Aim/Background
This study aims to systematically evaluate the practical runtime performance of the Insertion Sort algorithm across six widely used programming languages: C, C++, Go, Java, PHP, and Python. While Insertion Sort’s theoretical time complexity is well established, real-world execution performance may differ significantly due to variations in language paradigms, compilation strategies, and runtime environments. The research focuses on identifying how language-specific characteristics influence actual execution time.
Methods
The Insertion Sort algorithm was implemented uniformly in all six languages using a shared pseudocode to ensure consistency. Experiments were conducted under controlled conditions using input sizes of 1K, 10K, and 100K elements. Each dataset was tested with four different data arrangements: ascending, descending, nearly sorted, and random. Runtime measurements were collected and compared. Additionally, a Relative Execution Time Ratio (RETR) metric was introduced to provide a normalized and quantitative comparison of performance across languages.
Results
The experimental findings show clear performance differences among the programming languages. Go demonstrated the fastest runtimes across most scenarios, benefiting from its efficient compiled execution model. Java performed second-best, leveraging just-in-time (JIT) compilation and runtime optimizations. C and C++ showed moderate performance, influenced by compiler optimization levels and memory management mechanisms. PHP and Python exhibited significantly slower execution times, particularly for large and poorly ordered datasets, mainly due to interpreter overhead and runtime inefficiencies. The RETR metric effectively highlighted these relative performance gaps.
Conclusion
The study confirms that programming language choice significantly impacts real-world algorithm performance, even for well-understood algorithms like Insertion Sort. Compiled languages with efficient runtime optimizations generally outperform interpreted languages, especially for larger datasets. These results emphasize the importance of selecting appropriate programming languages for performance-critical applications and aligning algorithm implementation with both data characteristics and execution environments.

Key words: Insertion Sort, Comparative Performance Analysis, Programming Languages, Algorithm Benchmarking, Runtime Comparison, Sorting Algorithms, Compiled vs Interpreted Languages, Language Efficiency, Experimental Evaluation, Relative Execution Time Ratio (RETR).







Bibliomed Article Statistics

63
8
R
E
A
D
S

45

2
D
O
W
N
L
O
A
D
S
0304
2026

Full-text options


Share this Article


Online Article Submission
• ejmanager.com




ejPort - eJManager.com
Author Tools
About BiblioMed
License Information
Terms & Conditions
Privacy Policy
Contact Us

The articles in Bibliomed are open access articles licensed under Creative Commons Attribution 4.0 International License (CC BY), which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.