I noticed a case of code that was expanded when migrating from underscore to more modern JavaScript, suspect this would happen in other places.
Adding more small utility functions, and publishing some on npm for reuse would be one solution. I think this would add non-zero overhead with most if not all JavaScript interpreters.
I think using macros would further improve this situation. I found some interesting resources:
Coming from this PR: https://github.com/apache/cordova-lib/pull/871
I noticed a case of code that was expanded when migrating from underscore to more modern JavaScript, suspect this would happen in other places.
Adding more small utility functions, and publishing some on npm for reuse would be one solution. I think this would add non-zero overhead with most if not all JavaScript interpreters.
I think using macros would further improve this situation. I found some interesting resources: