lru icon indicating copy to clipboard operation
lru copied to clipboard

remove hasOwnProp

Open jimmywarting opened this issue 7 years ago • 2 comments

remove hasOwnProp and using Object.create(null) should boost the perf a bit.

jimmywarting avatar Aug 27 '18 13:08 jimmywarting

Have you tested if this is actually faster? I remember the in operator being v slow back in the day but that might have changed of course :)

mafintosh avatar Aug 27 '18 13:08 mafintosh

If you would check if something is undefined then it would be a lot faster

https://jsperf.com/hasownproperty-vs-in-vs-undefined/12

jimmywarting avatar Aug 27 '18 14:08 jimmywarting