Whitespace Character

14,000,000 Leading Edge Experts on the ideXlab platform

Scan Science and Technology

Contact Leading Edge Experts & Companies

Scan Science and Technology

Contact Leading Edge Experts & Companies

The Experts below are selected from a list of 3 Experts worldwide ranked by ideXlab platform

Pelkonen N. - One of the best experts on this subject based on the ideXlab platform.

  • Comparing the performance of string operations across programming languages
    University of Oulu, 2020
    Co-Authors: Pelkonen N.
    Abstract:

    Abstract. In this thesis, the performance of string operations are compared across programming languages. Handling strings effectively is important especially when performance is a crucial factor and large string sizes may emerge. Common examples where large string sizes emerge are during digitalization of a product, reading string data from a database, reading and handling large CSV-files and Excel-files, converting file format to another file format (e.g. CSV to Excel and vice versa), and reading and handling a DOM-tree of a website. There has been a lot of corresponding research where programming languages are benchmarked, but none of them focus directly on string operations. The main goal of this thesis is to fill this gap in literature and try to find out which programming languages have the best results on string operations in terms of execution time and memory (maximum RSS) usage. The test environment was formed by creating randomly generated string files with sizes varying from ten thousand Characters to 100 million Characters. The generated Characters were ‘a’, ‘b’, and ‘ ‘ (Whitespace Character). The programming languages selected for this thesis were Python, C, C++, Java, Perl, Ruby, Go, and Swift. Go seemed to be the most effective language in execution times, although it was not the fastest in many operations. C used very little memory, but only five operations were implemented in it. Every operation was implemented in Python, and it used additional memory to loading the string file in only one operation, which was sorting a string. Swift had quite bad results, and this could be caused by the Linux version of Swift that was used. In regular expressions, Perl and C++ were overwhelmingly effective. Java used the most memory in every operation