delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2014/04/21/08:54:11

X-Authentication-Warning: delorie.com: mail set sender to djgpp-workers-bounces using -f
X-Recipient: djgpp-workers AT delorie DOT com
Date: Mon, 21 Apr 2014 15:53:54 +0300
From: Eli Zaretskii <eliz AT gnu DOT org>
Subject: Re: ctime.c changes add about 4.5k more size
In-reply-to: <CAA2C=vCm0FgM3K7y3r+fRT_Bz+OpVOUqsivKb_3pGvKf7a-fMg@mail.gmail.com>
X-012-Sender: halo1 AT inter DOT net DOT il
To: djgpp-workers AT delorie DOT com
Message-id: <83mwfedesd.fsf@gnu.org>
References: <CAA2C=vBamXSU9Eh53WTLos=nemZs+uJ09QPF9Y8Jj4OSdZPsyQ AT mail DOT gmail DOT com> <83vbu3cc6b DOT fsf AT gnu DOT org> <CAA2C=vB7j86JhFsKTp_Z-+NXM2PT3XKbh7vRqEDt-8RJEo2zpw AT mail DOT gmail DOT com> <CAA2C=vCm0FgM3K7y3r+fRT_Bz+OpVOUqsivKb_3pGvKf7a-fMg AT mail DOT gmail DOT com>
Reply-To: djgpp-workers AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

> Date: Mon, 21 Apr 2014 15:39:35 +0300
> From: Ozkan Sezer <sezeroz AT gmail DOT com>
> 
> FWIW, here is the long diff between versions 1.10 and 1.11 of ctime.c:
> http://www.delorie.com/bin/cvsweb.cgi/djgpp/src/libc/ansi/time/ctime.c
> http://www.delorie.com/bin/cvsweb.cgi/djgpp/src/libc/ansi/time/ctime.c.diff?r1=1.10&r2=1.11
> ... which adds more size to an already long time code.

The question is where do 5KB of extra code come from.  Some changes in
the diffs are just reshuffling of the same code, others add what
cannot possibly generate so much more instructions.

One way of finding the potential culprits is to compare the output of
"nm -A ctime.o" on both versions of compiled ctime.c.  It's possible
that some static function (those marked with the lower-case "t")
either grew in size or were added in the new version.

Armed with this knowledge, we might take a good look at those few
functions, and see if we can do without them, or maybe simplify them.

However, in general computing time_t value is a tricky business, so
it's quite possible the extra code is just some added feature (e.g., I
see some kind of quoting that is now being supported) or a bugfix, and
you cannot really do without those, if you want to be able to read the
latest time-zone files.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019