[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <DM6PR11MB2779B6863DA4A390EC68F4978C50A@DM6PR11MB2779.namprd11.prod.outlook.com>
Date: Thu, 8 Jun 2023 10:20:58 +0000
From: "Jadav, Raag" <raag.jadav@...el.com>
To: Mika Westerberg <mika.westerberg@...ux.intel.com>
CC: "linus.walleij@...aro.org" <linus.walleij@...aro.org>,
"andriy.shevchenko@...ux.intel.com"
<andriy.shevchenko@...ux.intel.com>,
"linux-gpio@...r.kernel.org" <linux-gpio@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"Sangannavar, Mallikarjunappa"
<mallikarjunappa.sangannavar@...el.com>,
"N, Pandith" <pandith.n@...el.com>
Subject: RE: [PATCH v1 1/4] pinctrl: intel: optimize set_mux hook
> On Thu, Jun 08, 2023 at 12:30:14PM +0530, Raag Jadav wrote:
> > Utilize a temporary variable for common shift operation inside
> > ->set_mux() hook and save a few bytes.
> >
> > add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-3 (-3)
> > Function old new delta
> > intel_pinmux_set_mux 245 242 -3
> > Total: Before=10472, After=10469, chg -0.03%
>
> Shouldn't the compiler be able to optimize this if you ask with the -Ox
> options?
Forgot to add. This is with default -O2.
Is it a good idea to mention it?
> I don't really see much benefit for "optimizations" like this. That said using
> temporary variable here improves readability so this one is acceptable by
> me. As long as you change the commit message accordingly.
Powered by blists - more mailing lists