Žalik, B.; Jeromel, A.; Kolingerová, I.; Lukač, N.; Repnik, B. On Move with Interleaving (MwI) Implementation. Preprints2024, 2024011432. https://doi.org/10.20944/preprints202401.1432.v1
APA Style
Žalik, B., Jeromel, A., Kolingerová, I., Lukač, N., & Repnik, B. (2024). On Move with Interleaving (MwI) Implementation. Preprints. https://doi.org/10.20944/preprints202401.1432.v1
Chicago/Turabian Style
Žalik, B., Niko Lukač and Blaž Repnik. 2024 "On Move with Interleaving (MwI) Implementation" Preprints. 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.