Skip to content

Conversation

@paavohuhtala
Copy link

  • Replace LinkedList in LinkedSlab with Vec
  • Enable building on stable Rust
  • Add id1 to .gitignore
  • Add .vscode to .gitignore
  • Refactor INPUT_NAMES & INPUT_VALUES into INPUT_MAP

This allows us to replace unstable LinkedList::drain_filter with stable
Vec::retain_mut. drain_filter has been unstable since 2017 and isn't
likely to stabilize any time soon.

I verified with Criterion benchmarks that with a list of 10K items,
Vec::retain_mut takes about 1/10th the time of LinkedList::drain_filter.
IMHO this is somewhat unintuitive - linked lists are supposed to be
efficient at removing random elements. However retain_mut is highly
optimized for multiple removals and manages to be more efficient than
multiple chained Vec::remove calls.

Combined with the memory benefits of linear allocations, I believe this
is a performance net positive, or at least not a regression.
Removes #![feature(drain_filter)], which is no longer used.
This allows copying the id1 folder to the project root without
accidentally commiting it.
Allows contributors to have individual VS Code config files (e.g format
on save), without accidentally commiting them.
This makes it easier to keep track of keyname-value pairs, and
removes the need to explicitly specify the length of two arrays.
BindInput::from_str is now more efficient because of the HashMap.

Also adds four bindings that were missing.
It was pinned to a commit which has been in `master` for over 2 years.
The required PR has been merged.
This was popularized by Bevy; this makes the engine run much better in
development builds while still remaining easy to debug in most cases.
Dropping a references does nothing.
Cloning a double reference (&&T) gives just another reference.
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