From b8d46406f64507b031c662d2a4fde4eccb5f8ccc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Sat, 2 Jan 2021 17:37:45 +0000 Subject: [PATCH] style: Inline nsTArray::deref. This shaves >50ms if the compiler decides not to inline it, compilers are sometimes dumb. Depends on D100593 Differential Revision: https://phabricator.services.mozilla.com/D100594 --- components/style/gecko_bindings/sugar/ns_t_array.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/components/style/gecko_bindings/sugar/ns_t_array.rs b/components/style/gecko_bindings/sugar/ns_t_array.rs index 04ba326c615..d10ed420dd8 100644 --- a/components/style/gecko_bindings/sugar/ns_t_array.rs +++ b/components/style/gecko_bindings/sugar/ns_t_array.rs @@ -13,6 +13,7 @@ use std::slice; impl Deref for nsTArray { type Target = [T]; + #[inline] fn deref<'a>(&'a self) -> &'a [T] { unsafe { slice::from_raw_parts(self.slice_begin(), self.header().mLength as usize) } }