Hans Van den Keybus
2015-06-29 13:37:35 UTC
Hi All,
Just wanted to let you know that I started a library to benchmark several
coding styles / code snippets.
The project can be found here:
https://github.com/dotdotcommadot/dotdotcommadot_dart_benchmarks
The goal is to find out which writing style is faster than the other.
A few remarkable conclusions I can already make are
- Foreach() loops are about 2x slower than using a for(var i...) loop
- When compiled to JavaScript, Operator Overloading works 8x (!!) faster
than calling a regular method
- In the Dart VM, String Interpolation ('$hello $world') is 3x faster than
the + operator (hello + ' ' + world)
However compiled to JavaScript, this makes no difference.
More tests will be coming up.
Feel free to contribute or make suggestions!
Just wanted to let you know that I started a library to benchmark several
coding styles / code snippets.
The project can be found here:
https://github.com/dotdotcommadot/dotdotcommadot_dart_benchmarks
The goal is to find out which writing style is faster than the other.
A few remarkable conclusions I can already make are
- Foreach() loops are about 2x slower than using a for(var i...) loop
- When compiled to JavaScript, Operator Overloading works 8x (!!) faster
than calling a regular method
- In the Dart VM, String Interpolation ('$hello $world') is 3x faster than
the + operator (hello + ' ' + world)
However compiled to JavaScript, this makes no difference.
More tests will be coming up.
Feel free to contribute or make suggestions!
--
For other discussions, see https://groups.google.com/a/dartlang.org/
For HOWTO questions, visit http://stackoverflow.com/tags/dart
To file a bug report or feature request, go to http://www.dartbug.com/new
To unsubscribe from this group and stop receiving emails from it, send an email to misc+***@dartlang.org.
For other discussions, see https://groups.google.com/a/dartlang.org/
For HOWTO questions, visit http://stackoverflow.com/tags/dart
To file a bug report or feature request, go to http://www.dartbug.com/new
To unsubscribe from this group and stop receiving emails from it, send an email to misc+***@dartlang.org.