PulseExploreJournal ClubDebatesTrendingResearchersJournals
Instagram
HomeExploreJournal ClubTrending
Synapse
⌘+K
Synapse
September 17, 2025Applied and Computational Engineering0 citations

Holistic Performance, Memory, and Energy Analysis of Sorting Algorithms and Binary Search Trees in Python

View Full Paper
ZYZihan Yang

Key Points

  • The fixed-threshold hybrid sorting method outperforms pure merge sort by 12-18%, showcasing efficient performance.
  • Memory fragmentation decreases by about 30% in hybrid methods compared to 40% for merge sort, indicating improved efficiency.
  • The AVL tree consistently exhibits O(log n) behavior while the unbalanced BST shows up to O(n) in worst-case scenarios, highlighting stability.
  • Timsort achieves the lowest energy footprint and fragmentation rates, making it a superior choice for practical applications.

Abstract

This paper presents a comprehensive, multi-metric evaluation of four sorting algorithmsrecursive merge sort, hybrid mergeinsertion sort with fixed and dynamic thresholds, and Pythons built-in Timsortas well as two binary search tree implementationsclassic unbalanced BST and self-balancing AVL treein a pure Python environment. Benchmarking spans four input distributions (random, sorted, reverse-sorted, and 25% perturbed) and four scales from103to106elements, jointly measuring wall-clock latency, memory fragmentation, and CPU/DRAM energy. The fixed-threshold hybrid (K=22) consistently outperforms pure merge by 1218%, while a dynamicnthreshold tracks within 510% without manual tuning. Instrumenting the AVL tree to count rotations yields an empirical slope of2.13n, and confirms stableO(logn)behavior even when worst-case ordered inputs drive an unbalanced BST to heightO(n)and quadratic total cost. Memory fragmentation drops by about 30% in the hybrid methods compared to40%for merge, with energy savings of 1520%; Timsort attains the lowest fragmentation and energy footprint among the methods evaluated. An automated Python-based benchmarking framework provides a reproducible blueprint for high-level algorithm analysis under realistic workloads.

Ask AI
Helpful
Bookmark
Share
View Full Paper

Cite This Study

Zihan Yang (2025) studied this question.

synapsesocial.com/papers/68d45e6231b076d99fa5ee2bhttps://doi.org/10.54254/2755-2721/2025.ld26932
Ask AI
Helpful
Bookmark
Share
View Full Paper

Also Consider

Synapse has enriched 5 closely related papers on similar clinical questions. Consider them for comparative context:

  1. 1A Comprehensive Study of Sorting Algorithm Performance Using Real-World Dataset Metrics2025 · 1 citations
  2. 2Comparative Performance Analysis of AVL, Red-Black, and B-Tree Data Structures in Insertion and Search Operations2026
  3. 3Comparative Performance Analysis of AVL, Red-Black, and B-Tree Data Structures in Insertion and Search Operations2026
  4. 4Comparative Analysis of Sorting Algorithms: TimSort Python and Classical Sorting Methods2024 · 2 citations
  5. 5Comparative Empirical Analysis of Binary Search Trees, AVL Trees, and Red-Black Trees Under Varying Input Distributions2026