bitv: add larger tests, better benchmarks & remove dead code.#16961
Merged
Conversation
There were no tests for iteration etc. with more than 5 elements, i.e. not even going beyond a single word. This situation is rectified. Also, the only benchmarks for `set` were with a constant bit value, which was not indicative of every situation, due to inlining & branch removal. This adds a benchmark at the other end of the spectrum: random input.
bors
added a commit
that referenced
this pull request
Sep 4, 2014
bitv: add larger tests, better benchmarks & remove dead code. There were no tests for iteration etc. with more than 5 elements, i.e. not even going beyond a single word. This situation is rectified. Also, the only benchmarks for `set` were with a constant bit value, which was not indicative of every situation, due to inlining & branch removal. This adds a benchmark at the other end of the spectrum: random input.
lnicola
pushed a commit
to lnicola/rust
that referenced
this pull request
Apr 7, 2024
Fix crate IDs when multiple workspaces are loaded Previously, we assumed that the crate numbers in a `rust-project.json` always matched the `CrateId` values in the crate graph. This isn't true when there are multiple workspaces, because the crate graphs are merged and the `CrateId` values in the merged graph are different. This broke flycheck (see first commit), because we were unable to find the workspace when a file changed, so we every single flycheck, producing duplicate compilation errors. Instead, use the crate root module path to look up the relevant flycheck. This makes `ProjectWorkspace::Json` consistenet with `ProjectWorkspace::Cargo`. Also, define a separate JSON crate number type, to prevent bugs like this happening again.
lnicola
pushed a commit
to lnicola/rust
that referenced
this pull request
Apr 20, 2024
Fix crate IDs when multiple workspaces are loaded Previously, we assumed that the crate numbers in a `rust-project.json` always matched the `CrateId` values in the crate graph. This isn't true when there are multiple workspaces, because the crate graphs are merged and the `CrateId` values in the merged graph are different. This broke flycheck (see first commit), because we were unable to find the workspace when a file changed, so we every single flycheck, producing duplicate compilation errors. Instead, use the crate root module path to look up the relevant flycheck. This makes `ProjectWorkspace::Json` consistenet with `ProjectWorkspace::Cargo`. Also, define a separate JSON crate number type, to prevent bugs like this happening again.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
bitv: add larger tests, better benchmarks & remove dead code.
There were no tests for iteration etc. with more than 5 elements,
i.e. not even going beyond a single word. This situation is rectified.
Also, the only benchmarks for
setwere with a constant bit value,which was not indicative of every situation, due to inlining & branch
removal. This adds a benchmark at the other end of the spectrum: random
input.