Skip to content

Step 2.2: Swapping values with mem::replace#13

Open
ziimakc wants to merge 2 commits intomainfrom
2_2_mem_replace
Open

Step 2.2: Swapping values with mem::replace#13
ziimakc wants to merge 2 commits intomainfrom
2_2_mem_replace

Conversation

@ziimakc
Copy link
Owner

@ziimakc ziimakc commented Feb 6, 2026

Resolves Step 2.2

Task

Improve and optimize the code contained in this step's crate to cut off redudant performance costs.

Solution

  1. Optimize rotate to do a 2 swaps instead 3 clones.
  2. Optimize resolve to not do a clone for unresolved cases, consuming original unresolved vector with take instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant