From: Wang Chen <wangchen@cn.fujitsu.com>
To: Ingo Oeser <netdev@axxeo.de>
Cc: "David S. Miller" <davem@davemloft.net>, NETDEV <netdev@vger.kernel.org>
Subject: Re: [PATCH 1/2] ipmr: delete redundant variable
Date: Wed, 23 Jul 2008 23:16:24 +0800 [thread overview]
Message-ID: <48874B48.8060001@cn.fujitsu.com> (raw)
In-Reply-To: <200807231405.39515.netdev@axxeo.de>
Ingo Oeser said the following on 2008-7-23 20:05:
> Hi Wand Chen,
>
> Wang Chen schrieb:
>> But "accessing entry of table by index" is always allowed,
>> right?
>> If the complier makes such pointer which spills a register with
>> the multiply/shift, the simple code as following is bug too:
>> i = table[100].field;
>> But it shouldn't, right :)
>
> I'm NOT telling you, that your transformation is introducing a BUG.
> It is semantically perfectly equivalent.
>
> I'm trying to tell you, that it might not led to the same or better
> performance and might thus be not worth it.
>
Agree. I also think the accessing by index might lead to worse performance.
But in this code, we don't care performance, since it only be called when
device is unregistered. :)
> But please check the generated assembly yourself on a CISC and RISC
> machine to get an idea of the effects. It will be a nice learning
> experience I enjoyed myself already.
>
Sure. I am doing it.
next prev parent reply other threads:[~2008-07-23 15:18 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-23 1:45 [PATCH 1/2] ipmr: delete redundant variable Wang Chen
2008-07-23 8:03 ` Ingo Oeser
2008-07-23 9:35 ` Wang Chen
2008-07-23 12:05 ` Ingo Oeser
2008-07-23 15:16 ` Wang Chen [this message]
2008-07-24 7:37 ` Wang Chen
2008-07-25 17:36 ` Ingo Oeser
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=48874B48.8060001@cn.fujitsu.com \
--to=wangchen@cn.fujitsu.com \
--cc=davem@davemloft.net \
--cc=netdev@axxeo.de \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).