From: Michael G. Schwern Date: Fri, 22 Feb 2002 12:10:28 +0000 (-0500) Subject: Re: Pyrrhic compression in Encode X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=f20503bbf121299031767538fe403d28a96a825f;p=p5sagit%2Fp5-mst-13.2.git Re: Pyrrhic compression in Encode Message-ID: <20020222171027.GB4181@blackrider> p4raw-id: //depot/perl@14834 --- diff --git a/ext/Encode/compile b/ext/Encode/compile index 44104ef..7a40db9 100755 --- a/ext/Encode/compile +++ b/ext/Encode/compile @@ -290,9 +290,14 @@ END } close(D); close(H); + + my $perc_saved = $strings/($strings + $saved) * 100; + my $perc_subsaved = $strings/($strings + $subsave) * 100; printf STDERR "%d bytes in string tables\n",$strings; - printf STDERR "%d bytes (%.3g%%) saved spotting duplicates\n",$saved,100*$saved/$strings if $saved; - printf STDERR "%d bytes (%.3g%%) saved using substrings\n",$subsave,100*$subsave/$strings if $subsave; + printf STDERR "%d bytes (%.3g%%) saved spotting duplicates\n", + $saved, $perc_saved if $saved; + printf STDERR "%d bytes (%.3g%%) saved using substrings\n", + $subsave, $perc_subsaved if $subsave; } elsif ($doEnc) {