Journal "Software Engineering"
a journal on theoretical and applied science and technology
ISSN 2220-3397

Issue N6 2019 year

DOI: 10.17587/prin.10.274-280
Analysis of Performance of String Operations in C# on Different Platforms
K. V. Rochev, k@rochev.ru, Ukhta State Technical University, Ukhta, 169300, Russian Federation
Corresponding author: Rochev Konstantin V., Associate Professor, Ukhta State Technical University, Ukhta, 169300, Russian Federation, E-mail: k@rochev.ru
Received on December 22, 2018
Accepted on April 04, 2019

This publication analyzes the results of performance measurements of operations and commonly used C# lan­guage functions in different environments, such as WPF, Windows Forms, Unity. The performance of some string functions is analyzed in more detail. Several versions of the code development and execution tools, including Mono, Core, and the traditional.NET Framework, are reviewed to see if there is a difference in the speed at which functions are executed. To measure the performance of code sections, the author has implemented a compact class library that connects to different execution environments. Measuring the execution speed of the operations was conducted in various modes of Assembly. These include the debug phase in DEBUG mode and the release phase of the application in RELEASE mode. When comparing the results of WPF and Windows Forms code performance in release mode, it was found that the average difference in the performance of operations for different groups can be caused by measurement errors, which is not surprising, since a single framework is used. As for the comparison of WPF with Unity and .Net Core, the differences in the speed of operations are more significant. Calls to empty functions and variable calls in Unity are somewhat slower. And working with strings in Unity is even more inferior to the traditional version of the framework. In. Net Core, the average performance is the same as in WPF. However, the performance of single functions differs significantly. It is shown that with close measurement results for most of the considered operations, even in related development environments in some cases there are fundamental differences in the performance of frequently used operations.

Keywords: performance, code optimization, performance, C#, WPF, Windows Forms, DOT.NET Framework, Unity, Core
pp. 274–280.
For citation:
Rochev K. V. Analysis of Performance of String Operations in C# on Different Platforms, Programmnaya Ingeneria, 2019, vol. 10, no. 6, pp. 274—280.