Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
xiphias2
· 7y ago · 0 comments
After I implemented this and compared with just encoding the key with JSON, it turned out that JSON.stringify is so fast, that it's not really worth the effort.
Comments
[–]
univerio
7y ago
Unfortunately JSON.stringify makes no guarantees about the order of keys in an Object, so that can break in subtle ways.
[–]
xiphias2
OP
7y ago
Aha, that's true. I wasn't using hash maps when I did this, but what you write makes sense.