Skip to content

Use SmallVec in bitsets #109458

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 25, 2023
Merged

Conversation

Noratrieb
Copy link
Member

This doesn't increase their size and means that we don't have to heap allocate for small sets.

This doesn't increase their size and means that we don't have to heap
allocate for small sets.
@rustbot
Copy link
Collaborator

rustbot commented Mar 21, 2023

r? @wesleywiser

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Mar 21, 2023
@Noratrieb
Copy link
Member Author

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Mar 21, 2023
@bors
Copy link
Collaborator

bors commented Mar 21, 2023

⌛ Trying commit 29c1132 with merge 0c8d05b63a32307e32af27b76105d7a892f90ec0...

@bors
Copy link
Collaborator

bors commented Mar 21, 2023

☀️ Try build successful - checks-actions
Build commit: 0c8d05b63a32307e32af27b76105d7a892f90ec0 (0c8d05b63a32307e32af27b76105d7a892f90ec0)

@rust-timer

This comment has been minimized.

Copy link
Member

@wesleywiser wesleywiser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

r=me if perf is ok

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (0c8d05b63a32307e32af27b76105d7a892f90ec0): comparison URL.

Overall result: ❌✅ regressions and improvements - ACTION NEEDED

Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf.

Next Steps: If you can justify the regressions found in this try perf run, please indicate this with @rustbot label: +perf-regression-triaged along with sufficient written justification. If you cannot justify the regressions please fix the regressions and do another perf run. If the next run shows neutral or positive results, the label will be automatically removed.

@bors rollup=never
@rustbot label: -S-waiting-on-perf +perf-regression

Instruction count

This is a highly reliable metric that was used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
0.3% [0.3%, 0.3%] 1
Regressions ❌
(secondary)
1.2% [1.1%, 1.3%] 5
Improvements ✅
(primary)
-0.7% [-1.3%, -0.3%] 17
Improvements ✅
(secondary)
-0.9% [-1.4%, -0.4%] 13
All ❌✅ (primary) -0.6% [-1.3%, 0.3%] 18

Max RSS (memory usage)

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.5% [-2.5%, -2.5%] 1
All ❌✅ (primary) - - 0

Cycles

This benchmark run did not return any relevant results for this metric.

@rustbot rustbot added perf-regression Performance regression. and removed S-waiting-on-perf Status: Waiting on a perf run to be completed. labels Mar 22, 2023
@Noratrieb
Copy link
Member Author

174,809,487  ???:<rustc_const_eval::interpret::eval_context::InterpCx<rustc_const_eval::const_eval::machine::CompileTimeInterpreter>>::push_stack_frame
 85,533,404  ???:<rustc_const_eval::interpret::eval_context::InterpCx<rustc_const_eval::const_eval::machine::CompileTimeInterpreter>>::statement

Maybe const eval uses a bitsest and the access to it got slower because of the smallvec? I'll try looking deeper later (as const eval perf is quite important imo due to Miri)

@Noratrieb
Copy link
Member Author

@oli-obk told me to ignore ctfe stress as it's inlining noise.
@bors r=wesleywiser

@bors
Copy link
Collaborator

bors commented Mar 24, 2023

📌 Commit 29c1132 has been approved by wesleywiser

It is now in the queue for this repository.

@bors
Copy link
Collaborator

bors commented Mar 24, 2023

🌲 The tree is currently closed for pull requests below priority 100. This pull request will be tested once the tree is reopened.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 24, 2023
@Noratrieb Noratrieb added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. perf-regression-triaged The performance regression has been triaged. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 24, 2023
@bors
Copy link
Collaborator

bors commented Mar 25, 2023

⌛ Testing commit 29c1132 with merge 6196dc5223c3904b29f935948258804aafabb726...

@bors
Copy link
Collaborator

bors commented Mar 25, 2023

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Mar 25, 2023
@Noratrieb
Copy link
Member Author

@bors retry

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 25, 2023
@rust-log-analyzer
Copy link
Collaborator

The job i686-mingw-1 failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
[2628/3021] Linking CXX executable bin\llvm-profdata.exe
[2629/3021] Linking CXX static library lib\libLLVMX86CodeGen.a
[2630/3021] Linking CXX static library lib\libLLVMAVRCodeGen.a
[2631/3021] Linking CXX static library lib\libLLVMWebAssemblyCodeGen.a
FAILED: lib/libLLVMWebAssemblyCodeGen.a 
cmd.exe /C "cd . && "C:\Program Files\CMake\bin\cmake.exe" -E rm -f lib\libLLVMWebAssemblyCodeGen.a && C:\a\rust\rust\mingw32\bin\ar.exe qc lib\libLLVMWebAssemblyCodeGen.a  lib/Target/WebAssembly/CMakeFiles/LLVMWebAssemblyCodeGen.dir/WebAssemblyAddMissingPrototypes.cpp.obj lib/Target/WebAssembly/CMakeFiles/LLVMWebAssemblyCodeGen.dir/WebAssemblyArgumentMove.cpp.obj lib/Target/WebAssembly/CMakeFiles/LLVMWebAssemblyCodeGen.dir/WebAssemblyAsmPrinter.cpp.obj lib/Target/WebAssembly/CMakeFiles/LLVMWebAssemblyCodeGen.dir/WebAssemblyCFGStackify.cpp.obj lib/Target/WebAssembly/CMakeFiles/LLVMWebAssemblyCodeGen.dir/WebAssemblyCFGSort.cpp.obj lib/Target/WebAssembly/CMakeFiles/LLVMWebAssemblyCodeGen.dir/WebAssemblyDebugFixup.cpp.obj lib/Target/WebAssembly/CMakeFiles/LLVMWebAssemblyCodeGen.dir/WebAssemblyDebugValueManager.cpp.obj lib/Target/WebAssembly/CMakeFiles/LLVMWebAssemblyCodeGen.dir/WebAssemblyLateEHPrepare.cpp.obj lib/Target/WebAssembly/CMakeFiles/LLVMWebAssemblyCodeGen.dir/WebAssemblyExceptionInfo.cpp.obj lib/Target/WebAssembly/CMakeFiles/LLVMWebAssemblyCodeGen.dir/WebAssemblyExplicitLocals.cpp.obj lib/Target/WebAssembly/CMakeFiles/LLVMWebAssemblyCodeGen.dir/WebAssemblyFastISel.cpp.obj lib/Target/WebAssembly/CMakeFiles/LLVMWebAssemblyCodeGen.dir/WebAssemblyFixBrTableDefaults.cpp.obj lib/Target/WebAssembly/CMakeFiles/LLVMWebAssemblyCodeGen.dir/WebAssemblyFixIrreducibleControlFlow.cpp.obj lib/Target/WebAssembly/CMakeFiles/LLVMWebAssemblyCodeGen.dir/WebAssemblyFixFunctionBitcasts.cpp.obj lib/Target/WebAssembly/CMakeFiles/LLVMWebAssemblyCodeGen.dir/WebAssemblyFrameLowering.cpp.obj lib/Target/WebAssembly/CMakeFiles/LLVMWebAssemblyCodeGen.dir/WebAssemblyISelDAGToDAG.cpp.obj lib/Target/WebAssembly/CMakeFiles/LLVMWebAssemblyCodeGen.dir/WebAssemblyISelLowering.cpp.obj lib/Target/WebAssembly/CMakeFiles/LLVMWebAssemblyCodeGen.dir/WebAssemblyInstrInfo.cpp.obj lib/Target/WebAssembly/CMakeFiles/LLVMWebAssemblyCodeGen.dir/WebAssemblyLowerBrUnless.cpp.obj lib/Target/WebAssembly/CMakeFiles/LLVMWebAssemblyCodeGen.dir/WebAssemblyLowerEmscriptenEHSjLj.cpp.obj lib/Target/WebAssembly/CMakeFiles/LLVMWebAssemblyCodeGen.dir/WebAssemblyLowerRefTypesIntPtrConv.cpp.obj lib/Target/WebAssembly/CMakeFiles/LLVMWebAssemblyCodeGen.dir/WebAssemblyMachineFunctionInfo.cpp.obj lib/Target/WebAssembly/CMakeFiles/LLVMWebAssemblyCodeGen.dir/WebAssemblyMCInstLower.cpp.obj lib/Target/WebAssembly/CMakeFiles/LLVMWebAssemblyCodeGen.dir/WebAssemblyMCLowerPrePass.cpp.obj lib/Target/WebAssembly/CMakeFiles/LLVMWebAssemblyCodeGen.dir/WebAssemblyNullifyDebugValueLists.cpp.obj lib/Target/WebAssembly/CMakeFiles/LLVMWebAssemblyCodeGen.dir/WebAssemblyOptimizeLiveIntervals.cpp.obj lib/Target/WebAssembly/CMakeFiles/LLVMWebAssemblyCodeGen.dir/WebAssemblyOptimizeReturned.cpp.obj lib/Target/WebAssembly/CMakeFiles/LLVMWebAssemblyCodeGen.dir/WebAssemblyPeephole.cpp.obj lib/Target/WebAssembly/CMakeFiles/LLVMWebAssemblyCodeGen.dir/WebAssemblyRegisterInfo.cpp.obj lib/Target/WebAssembly/CMakeFiles/LLVMWebAssemblyCodeGen.dir/WebAssemblyRegColoring.cpp.obj lib/Target/WebAssembly/CMakeFiles/LLVMWebAssemblyCodeGen.dir/WebAssemblyRegNumbering.cpp.obj lib/Target/WebAssembly/CMakeFiles/LLVMWebAssemblyCodeGen.dir/WebAssemblyRegStackify.cpp.obj lib/Target/WebAssembly/CMakeFiles/LLVMWebAssemblyCodeGen.dir/WebAssemblyReplacePhysRegs.cpp.obj lib/Target/WebAssembly/CMakeFiles/LLVMWebAssemblyCodeGen.dir/WebAssemblyRuntimeLibcallSignatures.cpp.obj lib/Target/WebAssembly/CMakeFiles/LLVMWebAssemblyCodeGen.dir/WebAssemblySelectionDAGInfo.cpp.obj lib/Target/WebAssembly/CMakeFiles/LLVMWebAssemblyCodeGen.dir/WebAssemblySetP2AlignOperands.cpp.obj lib/Target/WebAssembly/CMakeFiles/LLVMWebAssemblyCodeGen.dir/WebAssemblySortRegion.cpp.obj lib/Target/WebAssembly/CMakeFiles/LLVMWebAssemblyCodeGen.dir/WebAssemblyMemIntrinsicResults.cpp.obj lib/Target/WebAssembly/CMakeFiles/LLVMWebAssemblyCodeGen.dir/WebAssemblySubtarget.cpp.obj lib/Target/WebAssembly/CMakeFiles/LLVMWebAssemblyCodeGen.dir/WebAssemblyTargetMachine.cpp.obj lib/Target/WebAssembly/CMakeFiles/LLVMWebAssemblyCodeGen.dir/WebAssemblyTargetObjectFile.cpp.obj lib/Target/WebAssembly/CMakeFiles/LLVMWebAssemblyCodeGen.dir/WebAssemblyTargetTransformInfo.cpp.obj && C:\a\rust\rust\mingw32\bin\ranlib.exe lib\libLLVMWebAssemblyCodeGen.a && cd ."
C:\a\rust\rust\mingw32\bin\ranlib.exe: could not create temporary file whilst writing archive: no more archived files
[2632/3021] Linking CXX static library lib\libLLVMWebAssemblyDisassembler.a
[2633/3021] Building CXX object tools/lli/CMakeFiles/lli.dir/ExecutionUtils.cpp.obj
[2634/3021] Linking CXX static library lib\libLLVMM68kCodeGen.a
[2635/3021] Building CXX object tools/lli/ChildTarget/CMakeFiles/lli-child-target.dir/ChildTarget.cpp.obj
[2635/3021] Building CXX object tools/lli/ChildTarget/CMakeFiles/lli-child-target.dir/ChildTarget.cpp.obj
[2636/3021] Building CXX object tools/lli/CMakeFiles/lli.dir/lli.cpp.obj
[2637/3021] Building CXX object tools/dsymutil/CMakeFiles/dsymutil.dir/MachOUtils.cpp.obj
[2638/3021] Linking CXX static library lib\libLLVMPasses.a
ninja: build stopped: subcommand failed.
command did not execute successfully, got: exit code: 1


build script failed, must exit now', C:\Users\runneradmin\.cargo\registry\src\index.crates.io-1cd66030c949c28d\cmake-0.1.48\src\lib.rs:975:5
 finished in 298.400 seconds
Build completed unsuccessfully in 0:07:19
Build completed unsuccessfully in 0:07:19
make: *** [Makefile:78: ci-mingw-subset-1] Error 1

@bors
Copy link
Collaborator

bors commented Mar 25, 2023

⌛ Testing commit 29c1132 with merge 2d429f3...

@bors
Copy link
Collaborator

bors commented Mar 25, 2023

☀️ Test successful - checks-actions
Approved by: wesleywiser
Pushing 2d429f3 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Mar 25, 2023
@bors bors merged commit 2d429f3 into rust-lang:master Mar 25, 2023
@rustbot rustbot added this to the 1.70.0 milestone Mar 25, 2023
@Noratrieb Noratrieb deleted the smol-cute-little-bits branch March 25, 2023 19:46
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (2d429f3): comparison URL.

Overall result: ❌✅ regressions and improvements - ACTION NEEDED

Next Steps: If you can justify the regressions found in this perf run, please indicate this with @rustbot label: +perf-regression-triaged along with sufficient written justification. If you cannot justify the regressions please open an issue or create a new PR that fixes the regressions, add a comment linking to the newly created issue or PR, and then add the perf-regression-triaged label to this PR.

@rustbot label: +perf-regression
cc @rust-lang/wg-compiler-performance

Instruction count

This is a highly reliable metric that was used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
0.8% [0.7%, 1.0%] 8
Improvements ✅
(primary)
-0.8% [-1.4%, -0.3%] 15
Improvements ✅
(secondary)
-0.7% [-1.4%, -0.3%] 15
All ❌✅ (primary) -0.8% [-1.4%, -0.3%] 15

Max RSS (memory usage)

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
1.6% [1.6%, 1.7%] 2
Improvements ✅
(primary)
-4.1% [-4.1%, -4.1%] 1
Improvements ✅
(secondary)
-1.0% [-2.3%, -0.4%] 10
All ❌✅ (primary) -4.1% [-4.1%, -4.1%] 1

Cycles

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
2.1% [2.1%, 2.1%] 1
Improvements ✅
(primary)
-2.9% [-2.9%, -2.9%] 1
Improvements ✅
(secondary)
-0.6% [-0.6%, -0.6%] 1
All ❌✅ (primary) -2.9% [-2.9%, -2.9%] 1

@rylev
Copy link
Member

rylev commented Mar 28, 2023

Improvements outweigh the regressions and for some of the regressions, it should be fine to ignore the result as noise.

@rustbot label: +perf-regression-triaged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. perf-regression Performance regression. perf-regression-triaged The performance regression has been triaged. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants