cote
cote copied to clipboard
Performance: Use maps instead of objects.
In numerous places across the project, standard JS objects are used instead of Maps for Map like data structures.
Maps offer better performance over objects-as-maps, and can be done in places like callback storage (ie object.callbacks[id] = cb;) type patterns.
https://github.com/dashersw/cote/blob/8ad01558acec248e2a6cfe2680a13e8bfe7dffc2/src/components/time-balanced-requester.js#L12 https://github.com/dashersw/cote/blob/ac31387382e98a7bd22e37207a22fed08ba70496/src/components/pending-balanced-requester.js#L36