servo / rust-mozjs

DEPRECATED - moved to servo/mozjs instead.
Mozilla Public License 2.0
293 stars 122 forks source link

More inlining possibilities #277

Closed jdm closed 8 years ago

jdm commented 8 years ago

These methods were showing up in profiles in https://github.com/servo/servo/issues/12354. This change reduced testcase time by 100ms.


This change is Reviewable

metajack commented 8 years ago

r=me but for the question about inline(always).


Reviewed 3 of 3 files at r1. Review status: all files reviewed at latest revision, 1 unresolved discussion.


_src/jsval.rs, line 201 [r1] (raw file):_


impl JSVal {
    #[inline(always)]

Is #[inline] not sufficient in these cases? I thought #[inline(always)] was something to avoid in general?


_Comments from Reviewable_

jdm commented 8 years ago

In general that's true. On the other hand, Gecko uses MOZ_ALWAYS_INLINE for stuff like this because we really want these things to be inlined in the cases we care about.

metajack commented 8 years ago

@bors-servo r+

bors-servo commented 8 years ago

:pushpin: Commit 53871a2 has been approved by metajack

bors-servo commented 8 years ago

:hourglass: Testing commit 53871a2 with merge bc9add6...

bors-servo commented 8 years ago

:sunny: Test successful - travis