this post was submitted on 06 Oct 2026
6 points (100.0% liked)

Ask Experienced Devs

1513 readers
8 users here now

Icon base by Delapouite under CC BY 3.0 with modifications to add a gradient

founded 3 years ago
MODERATORS
 

I'm asking because inside a hashmap each element would have a signature, then it's easier to compare, no? #question

top 1 comments
sorted by: hot top controversial new old
[–] sukhmel@programming.dev 4 points 2 days ago

I'm not sure I understand you, but the signature will most often have a separate ordering that won't help with ordering the objects themselves.

Also, there are TreeMaps, that maintain order of elements, but those do the work on every insert