On Mar 21, 2012, at 1:48 PM, Andy Wingo wrote:
Hello Maciej!
This is great feedback. I think the work I have done meets your points (1) and (2), modulo the TDZ, for which we need to add some analysis to elide the barrier. (3) is on my radar. We'll see once I get the fully-baked patch with let and const.
The broader point about the need to turn these into tests is well-taken. Would it be useful to develop some sort of ES6 performance suite?
It would be good to have performance tests of ES6 (and ES5!) features, but probably beyond the scope of this specific task. I think one place where it is relevant to make comparison tests is when a new feature is intended to replace an old way of doing something. In that case, authors reasonably would expect no perf hit from using the new feature the same as the old one. Examples: - Native JSON replaces JS-based JSON impls, so it needs to perform as well or better. - Function.bind() replaces hand-rolled bind implementations, so it needs to perform as well or better. - let replaces var, so it needs to perform as well or better. There may be other such examples. For features that have no old equivalent, there isn't an equally obvious minimum performance bar. Regards, Maciej