Article
Version 1
Preserved in Portico This version is not peer-reviewed
On Move with Interleaving (MwI) Implementation
Version 1
: Received: 18 January 2024 / Approved: 18 January 2024 / Online: 19 January 2024 (06:04:45 CET)
How to cite: Žalik, B.; Jeromel, A.; Kolingerová, I.; Lukač, N.; Repnik, B. On Move with Interleaving (MwI) Implementation. Preprints 2024, 2024011432. https://doi.org/10.20944/preprints202401.1432.v1 Žalik, B.; Jeromel, A.; Kolingerová, I.; Lukač, N.; Repnik, B. On Move with Interleaving (MwI) Implementation. Preprints 2024, 2024011432. https://doi.org/10.20944/preprints202401.1432.v1
Abstract
Various implementations of the Move with Interleaving transform are discussed in this paper, with the transformation itself explained briefly at first. The transform has an expected time complexity of O(n), where n represents the length of the sequence being transformed. The importance of implementation also grows as the sequences become longer. The paper explains three different implementations: the first uses the standard vector, the second employs a lookup table, and the third utilises a dynamic linked list with a pool of released records. The experiments were conducted on 32 greyscale raster images of various contexts and sizes. All three solutions were implemented in both C++ and Java, and then executed on three different platforms: a personal computer running MS Windows and Linux, and a Raspberry Pi 2 with Linux. The implementation based on the dynamic linked list was the fastest, and outperformed the vector-based implementation by more than 1800%. While direct comparisons between results on the Raspberry Pi and those on the modern personal computer may not be straightforward, a consistent pattern prevails: the dynamic linked list implementation outperformed the other two consistently, and the C++ code was faster than the code written in Java. The difference was most evident on the Raspberry Pi.
Keywords
string transformation; lookup table; efficiency; Java; C++
Subject
Computer Science and Mathematics, Computer Science
Copyright: This is an open access article distributed under the Creative Commons Attribution License which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.
Comments (0)
We encourage comments and feedback from a broad range of readers. See criteria for comments and our Diversity statement.
Leave a public commentSend a private comment to the author(s)
* All users must log in before leaving a comment