For the latest Dart news, visit our new blog at https://medium.com/dartlang .
John McCutchan shares three tips for benchmarking your Dart application. Benchmarking is the act of measuring how much memory or CPU time your application takes to execute. The article focuses on CPU benchmarking and explains how to correctly set up a Dart benchmark.
The article covers these three important steps when benchmarking your Dart application:
Make your code faster (Photo by Slooby) |
- Perform a warm-up before measuring code performance.
- Ensure the code does not raise any errors when run in checked mode.
- Run your benchmark in production mode with debugging disabled.
As always, the Dart team is interested in your feedback. Please join the Dart mailing list, ask questions on Stack Overflow, and file feature and bugs on dartbug.com.