Investigation and optimization of StringDeduplication with custom heuristic in different versions of the JVM - Noetzold, D. (2025)
Memory optimization in Java applications is essential for performance and scalability. This paper investigates the efficiency of the StringDeduplication parameter in JVM versions 11, 17, and 21, using a Web Crawler developed in Spring Boot. The results show that the efficiency of StringDeduplication decreased from 34.3% deduplication in version 11 to 3.4% in version 21, with an increase in deduplication time from 1,264 ms to 3,439 ms. To mitigate this problem, a custom solution in C was developed for JVM version 21, which increased deduplication to 31.1% and saved 110.2 MB of memory. The main scientific contribution of this work is the identification of the loss of efficiency of StringDeduplication in the latest JVM versions and the proposal of a custom solution that improves string deduplication, offering a viable alternative for developers and software engineers.