[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC] Re: [PATCH] new static const char[] channel (was: modname)
From: |
Robert Millan |
Subject: |
Re: [RFC] Re: [PATCH] new static const char[] channel (was: modname) |
Date: |
Tue, 2 Sep 2008 21:20:05 +0200 |
User-agent: |
Mutt/1.5.13 (2006-08-11) |
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."