Code size as a function of source size

=?ISO-8859-1?Q?J=FCrgen_B=F6hm?= <jboehm@gmx.net>
Wed, 12 Mar 2008 20:28:20 +0100

          From comp.compilers

Related articles
Code size as a function of source size jboehm@gmx.net (=?ISO-8859-1?Q?J=FCrgen_B=F6hm?=) (2008-03-12)
Re: Code size as a function of source size marcov@stack.nl (Marco van de Voort) (2008-03-14)
Re: Code size as a function of source size barry.j.kelly@gmail.com (Barry Kelly) (2008-03-14)
Re: Code size as a function of source size SidTouati@inria.fr (Sid Touati) (2008-04-22)
| List of all articles for this month |
From: =?ISO-8859-1?Q?J=FCrgen_B=F6hm?= <jboehm@gmx.net>
Newsgroups: comp.compilers
Date: Wed, 12 Mar 2008 20:28:20 +0100
Organization: T-Online
Keywords: code, question
Posted-Date: 13 Mar 2008 17:54:52 EDT

Hi,


I would like to pose a very simple question, for which nevertheless I
could not find an answer through google:


      Of what general type is the dependence of the size of compiled code
to the size of the respective source code?


      Or to put it "mathematically", what function f(s) approximates the
points (s, o(s)) best, where s is the size of the source code (say in
bytes and normalized by removing commentaries and not using uncommonly
long identifiers or amounts of white space) and o(s) is the size of
the corresponding object code (without any libraries linked in). It
seems natural to assume a linear dependence, but maybe the point-cloud
(s,o(s)) introduced above falls into several sub-clouds, each having
its own characteristic function?


    The reason I am asking is, that I wrote a little Lisp compiler for a
CPU that I developed and doing some comparisons as indicated above, it
seemed to be a linear relationship with o(s) approx. 1.75 * s.
      Now I would of course like to do some comparisons with other
compilers (not necessary only Lisp compilers) for other architectures,
but I could not find any figures tabulated on the net. Does anyone have
some pointers?


Thanks in advance for all answers


J|rgen


--
J|rgen Bvhm www.aviduratas.de


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.