This thesis investigates the energy efficiency of the Java collection HashMap withregard to insertions and lookups. Analyzing the default collision resolution technique which is a smart implementation of separate chaining, it also implementstwo other collision resolution techniques — double hashing and coalesced hashing — and compares the three in terms of their energy efficiency. The comparisons are done on their insertions and lookup algorithm both through an empirical study and of their time complexities. One of the findings of this thesis isthe preferred initial table size for energy efficiency which is between 2-5 times larger than the amount of insertions. The results show that during insertion thedefault implementation is more energy efficient especially at higher load factors. With lookups the coalesced hashing algorithm is more efficient but it is sucha small difference compared to the default implementation it is almost negligible. Overall the default implementation is the most energy efficient of the threeand it is not impacted much by load factor. These factors make the default implementation the preferable implementation for most applications, however incases where the load factor does not exceed 0.3, double hashing is the preferableoption as it consumes less energy than the other three.
Identifer | oai:union.ndltd.org:UPSALLA1/oai:DiVA.org:umu-226832 |
Date | January 2024 |
Creators | Jonsson, Theodor |
Publisher | Umeå universitet, Institutionen för datavetenskap |
Source Sets | DiVA Archive at Upsalla University |
Language | English |
Detected Language | English |
Type | Student thesis, info:eu-repo/semantics/bachelorThesis, text |
Format | application/pdf |
Rights | info:eu-repo/semantics/openAccess |
Relation | UMNAD ; 1476 |
Page generated in 0.0026 seconds