perf: Eagerly convert literals to consts#68118
Conversation
|
r? @eddyb (rust_highfive has picked a reviewer for you, use r? to override) |
|
The job Click to expand the log.I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
952247d to
5a20dba
Compare
|
@bors try @rust-timer queue |
|
Awaiting bors try build completion |
perf: Eagerly convert literals to consts Previousely even literal constants were being converted to an `Unevaluted` constant for evaluation later. This seems unecessary as no more information is needed to be able to convert the literal to a mir constant. Hopefully this will also minimise the performance impact of #67717, as far less constant evaluations are needed.
|
☀️ Try build successful - checks-azure |
|
Queued 3704c43 with parent 543b7d9, future comparison URL. |
|
Finished benchmarking try commit 3704c43, comparison URL. |
…on unevaluated consts which requires a lot of unnecessary work to evaluate them further down the line.
5a20dba to
02fffc1
Compare
|
Rebased. |
|
@bors r+ |
|
📌 Commit 02fffc1 has been approved by |
|
⌛ Testing commit 02fffc1 with merge 05ae4a7c0365d040dda20ff94107b371939003d0... |
|
The job Click to expand the log.I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
|
💔 Test failed - checks-azure |
|
@bors r+ |
|
📌 Commit 583a4fc has been approved by |
perf: Eagerly convert literals to consts Previousely even literal constants were being converted to an `Unevaluted` constant for evaluation later. This seems unecessary as no more information is needed to be able to convert the literal to a mir constant. Hopefully this will also minimise the performance impact of rust-lang#67717, as far less constant evaluations are needed.
perf: Eagerly convert literals to consts Previousely even literal constants were being converted to an `Unevaluted` constant for evaluation later. This seems unecessary as no more information is needed to be able to convert the literal to a mir constant. Hopefully this will also minimise the performance impact of #67717, as far less constant evaluations are needed.
|
☀️ Test successful - checks-azure |
|
@varkor Wait, does this fix |
| //[legacy]normalize-stderr-32bit: "hdb62078998ce7ea8" -> "SYMBOL_HASH" | ||
| //[legacy]normalize-stderr-64bit: "h62e540f14f879d56" -> "SYMBOL_HASH" |
There was a problem hiding this comment.
I don't think we care about hashes, you could probably use regex to always normalize away h[0-9a-f]{16}.
There was a problem hiding this comment.
(this scared me when I first saw it, but these are for the target, not the host, and symbol names don't have to be constant between targets)
Previousely even literal constants were being converted to an
Unevalutedconstant for evaluation later. This seems unecessary as no more information is needed to be able to convert the literal to a mir constant.Hopefully this will also minimise the performance impact of #67717, as far less constant evaluations are needed.