Bnaya / objectbuffer

JavaScript Object like api, backed by an arraybuffer
MIT License
171 stars 5 forks source link

[Optimizations] In hashmap creation don't check if key already exists in bucket #117

Open Bnaya opened 4 years ago

Bnaya commented 4 years ago

When creating hashmap, when check if keys already exists even thu it's guaranteed to be not, because we use hashMapInsertUpdateKeyIsPointerReturnNode and not dedicated function

https://github.com/Bnaya/objectbuffer/blob/develop/src/internal/hashmap/hashmap.ts#L89-L95

Also maybe avoid re-hash on creation if it comes to re balance.