mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-02 11:44:28 +00:00
Rollup merge of #43581 - alexcrichton:inline-more, r=michaelwoerister
rustc: Inline bitwise modification operators These need to be inlined across crates to avoid showing up as one-instruction functions in profiles! In the benchmark from #43578 this decreased the translation item collection step from 30s to 23s, and looks like it also allowed vectorization elsewhere of the operations!
This commit is contained in:
commit
c96ce4064a
@ -134,9 +134,11 @@ pub trait BitwiseOperator {
|
||||
|
||||
pub struct Union;
|
||||
impl BitwiseOperator for Union {
|
||||
#[inline]
|
||||
fn join(&self, a: usize, b: usize) -> usize { a | b }
|
||||
}
|
||||
pub struct Subtract;
|
||||
impl BitwiseOperator for Subtract {
|
||||
#[inline]
|
||||
fn join(&self, a: usize, b: usize) -> usize { a & !b }
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user