AutoSponge / set-state

MIT License
6 stars 1 forks source link

performance implications of construction #2

Open AutoSponge opened 7 years ago

AutoSponge commented 7 years ago

I'd like to investigate the performance implications of extending the Function constructor to create nodes, and provide methods via the prototype.

several implementations listed here, some of which seem promising.

AutoSponge commented 6 years ago

I tested a callable/extended function and a proxy implementation: https://github.com/AutoSponge/set-state/blob/callable/perf.bench.js. Callable was about the same performance and proxy was worse.

AutoSponge commented 6 years ago

Need to add a test that uses Object.create, Object.assign, or Object.defineProperties to stamp out the node instances.