How can I evaluate the performance of Dart?

Google is launching a new language, promising that it has better performance, but how can I evaluate performance in Darth's source code?

Take for example the sun flower "drawFrame method:

// Draw the complete figure for the current number of seeds. void drawFrame() { ctx.clearRect(0, 0, MAX_D, MAX_D); for (var i=0; i<seeds; i++) { var theta = i * PI2 / PHI; var r = Math.sqrt(i) * SCALE_FACTOR; var x = xc + r * Math.cos(theta); var y = yc - r * Math.sin(theta); drawSeed(x,y); } } 

If we have many seeds , can we add instructions for evaluating elapsed time in for ?

+7
source share
3 answers

Google promises better performance later when the browser has a native dart.

Now Dart compiles directly to JavaScript and is bigger and slower than writing pure JavaScript.

The function you have is actually identical in pure javascript, so the runtime should be almost the same between the compiled dart and the direct version of javascript.

You can compare compiled JS Dart and JS on jsperf.com if you really wanted to.

+6
source

GOTO Keynote impressions are shown . It seems that Dart is about 2 times slower than the V8 at the moment. But this should improve over time in accordance with the Darth team.

+4
source

Late answer, but only yesterday they announced the performance / benchmarking page, which allows you to track performance over time v8, dart → js, and dart vm.

There is Dart VM Benchmarking , which tells you how to properly compare Dart VM.

+4
source

All Articles