I've made some snippet involving parsing a html and wants to know if the code runs slow or not, is this doable?
You need to run your app in debug mode then open DevTools and go to the Network Panel to see them.
By using 20MHZ crystal oscillator, it would be around 200 ns per period. SO it's 200ns*4 Tosc = 800ns/instruction. Since, i write the code in c language , then i compile the program and downloading the HEX file in microcontroller and it works//executes.
You can use Stopwatch to measure execution time :
Stopwatch stopwatch = new Stopwatch()..start(); doSomething(); print('doSomething() executed in ${stopwatch.elapsed}');
Dart 2:
new
final stopwatch = Stopwatch()..start(); doSomething(); print('doSomething() executed in ${stopwatch.elapsed}');
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With