3 ms·
Number of features isn't a terribly useful comparison, however, since it assumes all features are equal. It's like taking the arithmetic mean of very different
by magicalist 12y ago
Number of features isn't a terribly useful comparison, however, since it assumes all features are equal. It's like taking the arithmetic mean of very different benchmarks as a benchmark score.
Writing tests for 'let' support, for instance, is harder than just testing that all the Array.prototype methods are now on TypedArrays, so those methods are worth twice that of let support, even though let is considerably more complicated to implement and game changing in its consequences.
- kangax 12y agoDefinitely. And that's why we give different weight to different features. Smallest ones (Math methods, octal & binary literals, etc.) have a weight of 0.25. Medium ones (Map, Set, rest parameters, etc.) have a weight of 0.5. Finally, landmark features (arrow functions, classes, generators) have a weight of 1. The final % score is calculated according to all this.