All of lore.kernel.org
 help / color / mirror / Atom feed
From: Robert Millan <rmh@aybabtu.com>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: Re: [RFC] Re: [PATCH] new static const char[] channel (was: modname)
Date: Tue, 2 Sep 2008 21:20:05 +0200	[thread overview]
Message-ID: <20080902192005.GA9070@thorin> (raw)
In-Reply-To: <1220364356.6359.24.camel@fz.local>

On Tue, Sep 02, 2008 at 04:05:56PM +0200, Felix Zielcke wrote:
> Am Dienstag, den 02.09.2008, 15:12 +0200 schrieb Felix Zielcke:
> 
> > current upstream SVN without my patch
> > -rw-r--r-- 1 root root 25153  2. Sep 15:02 /boot/grub/core.img
> > and with it
> > -rw-r--r-- 1 root root 25220  2. Sep 15:10 /boot/grub/core.img
> > 
> > So it seems it's getting 67 bytes bigger in my case :(
> 
> As now even talked on IRC GCC seems to be able to optimize string
> constants already better with directly using them instead of using a
> `static const char' for them.
> Probable because some strings appear in more then one file.
> 
> So in terms of code size better use a macro for this, which would be
> then a pure cosmetical change.
> 
> Attached is now my previous patch, changed with a bit Search&Replace, so
> you all can easily see how it would actually look like.

I don't think there's any gain in this.  Initially, I thought it'd be an
improvement size-wise, but now it's only an added level of complexity when
reading the code, in it just adds confusion AFAICS.

Seeing that size is not an issue, I think the current use scheme of
grub_dprintf is fine already.

-- 
Robert Millan

  The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and
  how) you may access your data; but nobody's threatening your freedom: we
  still allow you to remove your data and not access it at all."



      reply	other threads:[~2008-09-02 19:21 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-28 17:09 [PATCH] new static const char[] modname Felix Zielcke
2008-08-28 18:10 ` Felix Zielcke
2008-08-28 18:31   ` Marco Gerards
2008-08-28 18:38     ` Felix Zielcke
2008-08-30 12:01 ` Robert Millan
2008-08-30 12:36   ` Felix Zielcke
2008-08-30 12:42     ` Robert Millan
2008-09-01 11:24       ` [PATCH] new static const char[] channel (was: modname) Felix Zielcke
2008-09-01 21:55         ` Robert Millan
2008-09-02 13:12         ` Felix Zielcke
2008-09-02 14:05           ` [RFC] " Felix Zielcke
2008-09-02 19:20             ` Robert Millan [this message]

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=20080902192005.GA9070@thorin \
    --to=rmh@aybabtu.com \
    --cc=grub-devel@gnu.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.