Skip to content

Instantly share code, notes, and snippets.

View techguybiswa's full-sized avatar
💭
Building something meaningful

Biswarup Banerjee techguybiswa

💭
Building something meaningful
View GitHub Profile
@techguybiswa
techguybiswa / HashMap.ts
Created April 23, 2019 07:53 — forked from alaa-eddine/HashMap.ts
This is an experimental HashMap implementation with some features I needed and didn't found in JS default Arrays and Objects Features : * Direct acces too elements throught .get(key) * fast keys or values iteration using for (;;) instead of for in syntax (http://jsperf.com/array-keys-vs-object-keys-iteration/3 )
/*
This is an experimental HashMap implementation with some features I needed and didn't found in JS default Arrays and Objects
Features :
* Direct acces too elements throught .get(key)
* fast keys or values iteration using for (;;) instead of for in syntax (http://jsperf.com/array-keys-vs-object-keys-iteration/3 )
*/
class HashMap {
public length: number = 0;