You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed the destructuring tests for TS indicated 150X slower times than es5.
This is unusual because the emitted code is actually (almost) identical to the es5. The only difference is one additional variable declaration / assignment.
It looks like the code emitted from benchmark includes the _read helper from tslib.
This looks to be because donwlevelIteration is turned on in tsc compiler options. That changes the emitted code to enable other scenarios (not tested) - making this slightly an unfair example.
I noticed the destructuring tests for TS indicated 150X slower times than es5.
This is unusual because the emitted code is actually (almost) identical to the es5. The only difference is one additional variable declaration / assignment.
Emitted ts code for test: http://www.typescriptlang.org/play/index.html#src=var%20data%20%3D%20%7B%0D%0A%20%20a%3A%20'foo'%2C%0D%0A%20%20b%3A%20%7Bc%3A%20'd'%7D%2C%0D%0A%20%20arr%3A%20%5B1%2C%202%2C%203%5D%0D%0A%7D%3B%0D%0A%0D%0Afunction%20fn()%20%7B%0D%0A%20%20var%20%7Ba%2C%20b%3A%7Bc%3Ab%7D%2C%20arr%3A%5B%2C%20c%5D%7D%20%3D%20data%3B%0D%0A%20%20return%20c%3B%0D%0A%7D%0D%0A%0D%0AassertEqual(fn()%2C%202)%3B%0D%0Atest(fn)%3B
es5 test:
The text was updated successfully, but these errors were encountered: