pub struct Day12 { /* private fields */ }
Expand description
2016 Day 12: Interpreting assembly, again.
The key optimization is that
inc $r1
dec $r2
jnz $r2 -2
can be replaced with $r1 += $r2
followed by $r2 = 0
. This reduces the number of simulated
cycles ~5,000 times for part 1 and ~100,000 times for part 2, to around ~200 cycles each.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Day12
impl RefUnwindSafe for Day12
impl Send for Day12
impl Sync for Day12
impl Unpin for Day12
impl UnwindSafe for Day12
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)