TypeScript performance (asm.js, closure compiler) and overhead

Viewed 20338

I'm looking into using TypeScript combined with a client-side MVC (most likely Backbone.js + Marionette.js or Ember.js) for future projects and therefor have a few questions related to performance and optimisation :

  • How does TypeScript output compare to native JavaScript performance wise ?

  • Since asm.js is a subset of JavaScript, would it be possible to convert TypeScript code into asm.js code ? If yes, is it already possible ?

  • Is it possible and still useful to create builds of AMD projects that use TypeScript with Google Closure compiler ?

  • How much overhead does TypeScript add on average, file-size wise ?

  • When using lightweight libraries like Backbone.js in a small project for example. Does it make sense to use TypeScript in regards to file size ?

I like the added benefits of TypeScript but I don't want to sacrifice performance for coding style and typing.

Any articles / books about using TypeScript in big projects, especially related to performance, optimisations and builds are very welcome !

Thank you in advance !

1 Answers
Related