Source Code Analysis for Performance Enhancement of the Mean Shift Algorithm
ABSTRACT Background The original serial implementation of the segmentation algorithm exhibits suboptimal performance, motivating a systematic optimization effort without compromising accuracy. Objective To analyze the unoptimized serial code and apply iterative code and compiler optimizations while preserving segmentation accuracy. Methods A multi‐stage optimization process was employed: Initial algorithm profiling to identify bottlenecks. Iterative application of static code transformations. Integration of compiler‐level optimizations at each stage. Results Performance testing demonstrates substantial speedups: 6x to 8x improvement over the original implementation, depending on optimization stage. Parallelization in the final step further enhances throughput without sacrificing correctness. Conclusion Systematic, profile‐guided optimization by combining code refactoring and compiler tuning yields significant performance gains. The approach maintains accuracy while enabling efficient parallelization, offering a scalable template for optimizing similar compute‐intensive algorithms.
Authors
- Damir Demirović (ORCID: https://orcid.org/0000-0003-2356-2914)
- Senada Avdić (ORCID: https://orcid.org/0000-0002-7236-9216)
Institutions
- University of Tuzla (BA)
Publication Details
- Journal
- Software Practice and Experience
- Published
- 2025-09-16
- DOI
- https://doi.org/10.1002/spe.70021
- Citations
- 1
- Primary Topic
- Advanced Data Compression Techniques
- Type
- article
- Field-Weighted Citation Impact
- 1.28