google / traceur-compiler

Traceur is a JavaScript.next-to-JavaScript-of-today compiler
Apache License 2.0
8.18k stars 580 forks source link

Performance tuning #1928

Closed arv closed 9 years ago

arv commented 9 years ago

I did some profiling and improved some hot functions.

arv commented 9 years ago

@johnjbarton PTAL

arv commented 9 years ago

A few hot functions no longer show up in the profile.

My profile was to run the feature tests in chrome. There is too much noise to see what the total benefit is (1.7s -> 1.6s?)

domenic commented 9 years ago

A reasonable real-world profile might be compiling whatwg/streams (including its tests). There's a good amount of ES2015 code there using Traceur.

arv commented 9 years ago

I was also considering making a perf test out of traceur but the main issue is the loading/validation of modules. Maybe I'll add an option to disable validation and then just transform all the files?

johnjbarton commented 9 years ago

A good test would run like users use traceur and break down the time a bit by phases.

arv commented 9 years ago

Fixed the travis issues.

Turns out that:

  1. transformAny was just broken... did I even test that?
  2. ES6ClassTransformer was putting BindingIdentifiers where IdentifierExpression was expected.
  3. We forgot to pass debugName to the method constructor

PTAL

johnjbarton commented 9 years ago

LGTM