Message from JavaScript talks

May 2017

— It's mostly slow to add

— 

Set add: 244.053ms
myset add: 3450.831ms
set has: 222.908ms
myset has: 293.247ms
set delete: 235.363ms
myset delete: 419.295ms
set add: 242.650ms
myset add: 3078.334ms
set has: 214.485ms
myset has: 243.206ms
set delete: 204.058ms
myset delete: 415.431ms
set add: 225.946ms
myset add: 3202.289ms
set has: 241.393ms
myset has: 241.304ms
set delete: 208.861ms
myset delete: 427.890ms
set add: 230.057ms
myset add: 3346.042ms
set has: 214.355ms
myset has: 242.989ms
set delete: 201.375ms
myset delete: 417.781ms

— Lookups are fast

— Holy hell haha

— Some of those adds are so slow

— Hmmm

— Might help if I Object.create(null) ?

— So the created children don't have prototypes?

— Ehhh, makes no difference

— Testing with random strings

— Language:

js


Source:
console.log(String(Math.random()).split('.')[1]);


Result:
10216151154600084

— These