Hacker News new | past | comments | ask | show | jobs | submit login

It's not really a fair comparison as the dart versions are more-or-less completely statically typed. If they wanted this to be fair they'd be using untyped (typing is "optional" in dart).

If you're allowed to modify the code in substantial and performance altering ways for one language, you should be allowed to for the other as well (the JS versions of both those benchmarks have substantial perf problems).

This is especially egregious given that the DeltaBlue tests is ported from untyped smalltalk, so the JS version is actually closer to the original.

[disclaimer: I work on the Dart VM]

Dart is actually not statically typed: in production mode (which is default) type annotations are ignored completely, in checked mode they are translated to runtime type guards and not checked globally&statically during compilation. For more details please take a look at: http://www.dartlang.org/articles/why-dart-types/

Published benchmark scores are coming from the production mode. Even if you remove all type annotations performance will not change a bit.

In fact by design Dart VM does not use any information provided in type annotations to perform optimizations.

Dart is not statically typed, the types are erased at runtime. i.e. There is no semantic difference to the running program with a Dart program that has types specified with one that does not.

The static type annotations are for Developer documentation only and are ignored by the VM.

Applications are open for YC Summer 2020

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact