mcollina / reusify

Reuse objects and functions with style
MIT License
162 stars 18 forks source link

Removed superfluous(?) assignments to 'tail' #5

Closed brunoscopelliti closed 7 years ago

brunoscopelliti commented 7 years ago

I've spent a few time trying to understand how reusifyworks. Am I missing something (what?) or we don't really need to keep tail around?

On my macbook

$ node -v
v8.0.0

$ node benchmarks/reuseNoCodeFunctionNoTail.js
Total time 72071
Total iterations 100000000
Iteration/s 1387520.6393695108

node benchmarks/reuseNoCodeFunction.js
Total time 71658
Total iterations 100000000
Iteration/s 1395517.5974769043

On Windows

node -v
v8.4.0

node benchmarks\reuseNoCodeFunctionNoTail.js
Total time 94073
Total iterations 100000000
Iteration/s 1063004.262647093

node benchmarks\createNoCodeFunction.js
Total time 95570
Total iterations 100000000
Iteration/s 1046353.4581981794
coveralls commented 7 years ago

Coverage Status

Coverage remained the same at 100.0% when pulling c7bce38240926b9bb51f1b94472f63c408105ff0 on brunoscopelliti:no-tail into f07e6ef9e772f1b82135d4dfe5663b050826fbf6 on mcollina:master.

mcollina commented 7 years ago

Thanks for this!!!