+1
Cargo.toml
+1
Cargo.toml
+8
src/main.rs
+8
src/main.rs
···
1
1
#[cfg(feature = "smallvec")]
2
2
use smallvec::SmallVec;
3
+
#[cfg(feature = "timing")]
3
4
use std::time::Instant;
4
5
5
6
#[cfg(feature = "smallvec")]
···
178
179
179
180
/// Begins the spin-cycle of the universal machine.
180
181
pub fn run(mut self) {
182
+
#[cfg(feature = "timing")]
183
+
let start = Instant::now();
184
+
181
185
loop {
182
186
match self.ops[self.program_counter as usize] {
183
187
// Operator #0. Conditional Move.
···
357
361
358
362
self.program_counter += 1;
359
363
}
364
+
365
+
#[cfg(feature = "timing")]
366
+
eprintln!("um complete: {:?}", start.elapsed());
360
367
}
361
368
362
369
/// Loads the value from the specified register.
···
419
426
}
420
427
}
421
428
429
+
#[cold]
422
430
#[inline(never)]
423
431
fn panic(&self) -> ! {
424
432
panic!(