News for hackers. Stuff that matters.
Re:Why Dart Types Are Optional and Unsound by azakai on Thursday January 05, 2012 @11:03PM (#3431904)
Yes, but how much of a slowdown is it to manage hidden classes? Furthermore, in the most performance sensitive code, you might not even have classes at all, just raw calculations (for example on typed arrays), which Dart will be no faster than JS at.
Re:Why Dart Types Are Optional and Unsound by DasIch on Friday January 06, 2012 @01:22AM (#3432257)
If you know the shape you can reduce attribute access to an array lookup, if you don't attribute access requires a hash table lookup. That is a problem for performance and memory consumption.
Re:Why Dart Types Are Optional and Unsound by azakai on Friday January 06, 2012 @01:50AM (#3432326)
Sure, but again, (1) JS engines can and do infer the shape at runtime using hidden classes, and they also get array lookups that way (and not hash table lookups), and (2) I suspect these lookups are not even on the critical path of typical performance-intensive code, but that's speculation of course.