This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: gcc/*: Deletion of unnecessary processing
- From: Basile STARYNKEVITCH <basile at starynkevitch dot net>
- To: Miura Yasuyuki <kokosabu at gmail dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Tue, 18 Sep 2007 16:23:40 +0200
- Subject: Re: gcc/*: Deletion of unnecessary processing
- References: <eec04b9a0709180713n49279e27o9c5436a25af000d3@mail.gmail.com>
Hello All
Miura Yasuyuki wrote:
Small correction.
I shortened initialization.
-- Yasuyuki
2007-09-18 Miura Yasuyuki <kokosabu@gmail.com>
* fond-const.c: Deletion of unnecessary processing.
Typo, fold not fond
Index: fold-const.c
===================================================================
--- fold-const.c (revision 128577)
+++ fold-const.c (working copy)
@@ -665,10 +665,8 @@
memset (quo, 0, sizeof quo);
- memset (num, 0, sizeof num); /* to zero 9th element */
- memset (den, 0, sizeof den);
-
encode (num, lnum, hnum);
+ num[4] = 0; /* to zero 9th element */
encode (den, lden, hden);
/* Special code for when the divisor < BASE. */
Is such a micro optimization requiring the effort? I find the original
memset much easier to read, and much more robust to code changes....
I'm not an expert about fold-const.c code....
But next year, I am not sure that many GCC developers would understand the
num[4] = 0; /* to zero 9th element */
statement. I'm not understanding it today!
Of course, if this optimisation is winning 1% of CPU time I understand
it is worth doing.
Just my (newbie in fold-const.c) impression.
Regards
--
Basile STARYNKEVITCH http://starynkevitch.net/Basile/
email: basile<at>starynkevitch<dot>net mobile: +33 6 8501 2359
8, rue de la Faiencerie, 92340 Bourg La Reine, France
*** opinions {are only mines, sont seulement les miennes} ***