Bnaya / objectbuffer

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

Refactor code flows that creating intermediate objects #94

Open Bnaya opened 4 years ago

Bnaya commented 4 years ago

We have several functions that returning separate values inside an intermediate object. These functions might be called very frequently internally. These code flows needs to be refactored to no depend of that.

Ideas for how:

Example: https://github.com/Bnaya/objectbuffer/blob/ab8ba9647fa62d6b2f2e9993a9c124e55beececa/src/internal/arrayHelpers.ts#L35-L39

https://github.com/Bnaya/objectbuffer/blob/da30950ea29d734691c7f70490bd662bb9fefbde/src/internal/hashmap/hashmap.ts#L422-L427

Search for // @todo avoid intermediate object in the code