|Machine code parsers (entropy of machine code) email@example.com (Andrey I. Savov) (1996-11-24)|
|Re: Machine code parsers (entropy of machine code) firstname.lastname@example.org (1996-11-26)|
|Re: Machine code parsers (entropy of machine code) email@example.com (Andrey I. Savov) (1996-12-01)|
|Re: Machine code parsers (entropy of machine code) firstname.lastname@example.org (1996-12-03)|
|Re: Machine code parsers (entropy of machine code) email@example.com (1996-12-07)|
|From:||firstname.lastname@example.org (Jacob Navia)|
|Date:||7 Dec 1996 23:10:34 -0500|
|References:||96-11-147 96-11-155 96-12-021|
> Derek M Jones <email@example.com> wrote
> > I once did a little experiment. I measured how well gzip compressed
> > executable programs for a vareity of machines. There did seem to
> > be some correlation between compression ratios for the same programs,
> > compiled for different cpu's.
> > Do you think optmised code will have a higher or lower entropy?
> It's hard to say, I'd expect higher than non-optimized, because
> usually some redundancies are removed during the optimization.
Optimized for what?
If the code was optimized for speed, then we would expect that the
compiler performs in-line loop expansion for instance, when it can
determine that a loop will be executed at most n times. This would
increase the redundancy of the generated code since the loop would be
If the code was optimized for space, tail-merging would decrease the
size of the code, so the redundancy would be lower.
This discussion could be more interesting if we define more precisely
the terms: optimizations are not ONE kind of thing. There are many
types, completely opposed. The redundancy level of RISC machines
machine code as has been already pointed out is lower than CISC's.
Besides here entropy is understood as redundancy level/information density.
As our old friend pkzip says when compressing:
compressing LOWERS the entropy, because the degree of disorder (entropy)
decreases with compression... We should be saying that optimizing for
size decreases the entropy (disorder) and optimizing for speed could
increase it. Right?
P.S. Sorry but my last lesson in physics was quite a while ago...
Jacob Navia Logiciels/Informatique
41 rue Maurice Ravel Tel (1) 188.8.131.52
93430 Villetaneuse Fax (1) 184.108.40.206
Return to the
Search the comp.compilers archives again.