Related articles |
---|
Machine code parsers (entropy of machine code) andrey@ix.netcom.com (Andrey I. Savov) (1996-11-24) |
Re: Machine code parsers (entropy of machine code) derek@knosof.co.uk (1996-11-26) |
Re: Machine code parsers (entropy of machine code) andrey@ix.netcom.com (Andrey I. Savov) (1996-12-01) |
Re: Machine code parsers (entropy of machine code) derek@knosof.co.uk (1996-12-03) |
Re: Machine code parsers (entropy of machine code) jacob@jacob.remcomp.fr (1996-12-07) |
From: | derek@knosof.co.uk (Derek M Jones) |
Newsgroups: | comp.compilers,comp.compilers.tools.pccts |
Date: | 3 Dec 1996 20:49:55 -0500 |
Organization: | Knowledge Software Ltd |
References: | 96-11-147 96-11-155 96-12-021 |
Keywords: | code, theory |
Derek M Jones <derek@knosof.co.uk> 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.
andrey@ix.netcom.com "Andrey I. Savov" writes:
> Well, you see, the gzip compression of executable code cannot give you
> a good idea about the entropy of the machine code, because gzip
> compresses everything as raw data.
Several people pointed this out in private e-mail. Some also pointed
out that data values would be very common. I had made the assumption
that because I was using large programs such effects would be small.
But I did not check this assumption :-(
> As for different CPUs I'd expect RISC code to have smallest entropy
> (compresses best).
I would agree with this.
| 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.
Unoptimised code might have a higher compression ration because
it contains longer sequences of duplicate instructions. Optimisations
tend to mangle code -> fewer common sequences.
I guess we need some experimental results.
derek
--
Derek M Jones tel: +44 (0) 1252 520 667
Knowledge Software Ltd email: derek@knosof.co.uk
Applications Standards Conformance Testing http://www.knosof.co.uk
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.