Skip to content
Snippets Groups Projects
Commit 6c41109f authored by Gustav Hansson's avatar Gustav Hansson
Browse files

bare 2

parent b06929c0
No related branches found
No related tags found
No related merge requests found
......@@ -18,7 +18,7 @@ use panic_halt as _;
use cortex_m::{iprintln, peripheral::DWT, Peripherals};
use cortex_m_rt::entry;
// burns CPU cycles by just looping `i` times
// burns CPU cycles by just 5looping `i` times
#[inline(never)]
fn wait(i: u32) {
for _ in 0..i {
......@@ -77,18 +77,24 @@ fn main() -> ! {
//
// What is the output in the ITM console?
//
// ** your answer here **
//
// bare2
// Start 2012359631
// End 2139359709
// Diff 127000078
//
// Rebuild and run in release mode
//
// > cargo build --example bare2 --release
//
// ** your answer here **
// bare2
// Start 3019839635
// End 3026839650
// Diff 7000015
//
// Compute the ratio between debug/release optimized code
// (the speedup).
//
// ** your answer here **
// 18,1428 times faster
//
// commit your answers (bare2_1)
//
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment