After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 633002 - meta-actor-window: Use G_UNLIKELY for TFP check
meta-actor-window: Use G_UNLIKELY for TFP check
Status: RESOLVED FIXED
Product: mutter
Classification: Core
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: mutter-maint
mutter-maint
Depends on:
Blocks:
 
 
Reported: 2010-10-23 20:35 UTC by drago01
Modified: 2010-11-18 17:52 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
meta-actor-window: Use G_UNLIKELY for TFP check (1.25 KB, patch)
2010-10-23 20:36 UTC, drago01
committed Details | Review

Description drago01 2010-10-23 20:35:56 UTC
This is just a microptimization, as we pretty much always use TFP (and do the check every time we set a pixmap), we can let gcc generate better code here.

Alternatively we could just remove it, but it might be still worth having to catch corner cases.

Note: I did not notice nor measure any performance impact, just noticed that while reading through the code.
Comment 1 drago01 2010-10-23 20:36:14 UTC
Created attachment 173092 [details] [review]
meta-actor-window: Use G_UNLIKELY for TFP check

This is just a microptimization, as we pretty much always use
TFP (and do the check every time we set a pixmap),
we can let gcc generate better code here.
Comment 2 Owen Taylor 2010-11-18 15:10:45 UTC
Review of attachment 173092 [details] [review]:

I'm not a scatter-G_UNLIKELY-through-code fan, but sure.