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:
Maybe one of the values is not in use
Maybe one of the values can be deduced from the other one (ptr can be from ptrToPtr)
When arrays are involved: maybe pass array from the caller and not return new one
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