2 ms·
I am very surprised with the stuff shown in this talk. One would think that by using a more explicit syntax, the compiler/interpreter has more context to optim
by arximboldi 10y ago
I am very surprised with the stuff shown in this talk. One would think that by using a more explicit syntax, the compiler/interpreter has more context to optimize and do things faster.
Looking at the destructuring example, it seems like part of the problem is that the new constructs are actually more general, since their semantics are defined in terms of iterators in order to support user defined types... I guess, on the other hand, this still allows for better overall system performance (e.g. one can now pass lazy-evaluated transformations instead of producting new arrays all the time when writing functional-style code.). An alternative would be to have sepparate syntax [a, b, c...] for arrays and (a, b, c...) for iterator based destructuring. There is the risk then that then everyone starts using the former syntax for the sake of premature optimization and we end up with over-restrictive API's that then disable the opportunities for lazy-evaluation and so on described before.
Definitely and interesting case. It would be nice to be able to read some of the discussion of the standardization process and see how these performance trade-offs where considered. Anyone has some pointers?
- magicalist 10y ago> It would be nice to be able to read some of the discussion of the standardization process and see how these performance trade-offs where considered. Anyone has some pointers? There's the mailing list at https://esdiscuss.org/ https://esdiscuss.org/ More recently there's been more discussion around specific proposals in github repos under the tc39 org: https://github.com/tc39 https://github.com/tc39 And Rick Waldron takes TC39 meeting notes in this repo: https://github.com/rwaldron/tc39-notes https://github.com/rwaldron/tc39-notes
- chr1 10y agoi have followed many of discussion on esdiscuss and unfortunately they were not paying much attention to performance, all too often the argument was: we need to get semantics right, thinking about the performance is the job of browser makers:(
- jacobolus 10y agoThis is why I like just using coffeescript. Nicer syntax than ES6, with the same speed as optimized basic Javascript (because that’s what it compiles to).