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.