Inline Finallyalizer::drop, allowing LLVM to optimize finally.
* fixes the vec::from_elem regression caused by #8780 * added 5 benchmarks for allocating a 1KB ~[u8] and zeroing it
This commit is contained in:
parent
1b12dca7f9
commit
331c6efe45
2 changed files with 56 additions and 0 deletions
|
|
@ -62,6 +62,7 @@ struct Finallyalizer<'a> {
|
|||
|
||||
#[unsafe_destructor]
|
||||
impl<'a> Drop for Finallyalizer<'a> {
|
||||
#[inline]
|
||||
fn drop(&mut self) {
|
||||
(self.dtor)();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue