Work

Research of the speed of MS-C#, C++, PYTHON AND C# - UNITY languages in developing digital signal processing algorithms

Year: 2025
Type: article
Abstract: Objective. This study aims to investigate the execution speed of widely used programming languages, including Microsoft C#, Microsoft C++, GCC C++, Unity C#, and Python (with and without the NumPy library), in the implementation of the Fast Discrete Cosine Transform (Fast DCT-II) algorithm. The primary goal is to provide a comparative analysis of these programming languages to highlight their strengths and weaknesses in handling computationally intensive tasks like the Fast DCT-II. Methods. The study employs a comparative experimental approach, where the Fast DCT-II algorithm is implemented in each programming language and environment under consistent conditions. Execution speed is measured across multiple test cases, and performance metrics are analyzed to determine efficiency factors. The analysis considers variables such as language-specific optimizations, the impact of multithreading, memory management overhead, and the use of specialized libraries like NumPy for Python. The results are evaluated to identify patterns and performance bottlenecks in each environment. Results. The experimental findings indicate that Unity C# achieves the fastest execution of the Fast DCT-II algorithm among the tested environments, except when compared to Python with the NumPy library. Unity C# outperforms the standard C++ implementation by 7.6% (efficiency factor of 1.08), largely due to its use of optimized libraries and multithreading capabilities, which enhance CPU resource utilization. Microsoft C# performs slightly slower than C++ with an efficiency factor of 0.95, attributed to memory management overhead and less optimized low-level operations in the .NET environment. GCC C++ demonstrates significantly lower efficiency, running 1.6 times slower than standard C++ (efficiency factor of 0.62). Python without NumPy exhibits poor performance with an efficiency factor of 0.08, due to its interpreted nature and lack of optimized FFT algorithms. However, Python with NumPy surpasses all other environments, achieving a speed 12.7 times faster than C++ (efficiency factor of 12.72), thanks to its high-performance C-based implementations of FFT and DCT. Scientific Novelty. This research contributes to the field of computational performance analysis by providing a detailed comparison of programming languages in the context of the Fast DCT-II algorithm. It highlights the impact of language-specific features and library optimizations on algorithm execution speed, offering new insights into the practical application of these languages for computationally intensive tasks. Practical Significance. The findings of this study are valuable for developers and researchers working on performance-critical applications, particularly those involving signal processing and algorithm optimization. The results can guide the selection of programming languages and environments for implementing similar algorithms, balancing speed, efficiency, and ease of development. Keywords: DSP, Fast Discrete Cosine Transform, FFT, Programming Languages, Performance Optimization, Unity, C#, Python NumPy, C++.
Language: English
Open Access status: bronze
OpenAlex ID: W4410924344
FWCI:
Cites:
Cited by:
Related to: 10