[Mono-bugs] [Bug 342190] [Performance] MS.NET 2.0 is twice faster as mono 1.2. 6 when compressing with SharpZipLib
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Tue Nov 20 08:09:20 EST 2007
https://bugzilla.novell.com/show_bug.cgi?id=342190#c10
--- Comment #10 from Robert Jordan <robertj at gmx.net> 2007-11-20 06:09:19 MST ---
I run some tests on the same machine (Windows XP, Intel Core Duo 2, 2GHz):
randomfile.bin
==============
MS.NET
/ziptest.exe randomfile.bin
ICSharpCode.SharpZipLib, Version=2.84.0.0, Culture=neutral,
PublicKeyToken=1b03e6acf1164f73
SharpZip :00:00:10.7343750
Zlib :00:00:14.4218750
MONO 1.2.6 on Windows:
mono neo:~/src/tests $ mono ./ziptest.exe randomfile.bin
ICSharpCode.SharpZipLib, Version=2.84.0.0, Culture=neutral,
PublicKeyToken=1b03e6acf1164f73
SharpZip :00:00:16.0940000
Zlib :00:00:08.4680000
logfile.txt
===========
MS.NET
ICSharpCode.SharpZipLib, Version=2.84.0.0, Culture=neutral,
PublicKeyToken=1b03e6acf1164f73
SharpZip :00:00:03.9218750
Zlib :00:00:04.1562500
MONO 1.2.6 on Windows
mono neo:~/src/tests $ mono ./ziptest.exe logfile.txt
ICSharpCode.SharpZipLib, Version=2.84.0.0, Culture=neutral,
PublicKeyToken=1b03e6acf1164f73
SharpZip :00:00:07.8440000
Zlib :00:00:02.2650000
zerofile.bin
============
MS.NET
mono neo:~/src/tests $ ./ziptest.exe zerofile.bin
ICSharpCode.SharpZipLib, Version=2.84.0.0, Culture=neutral,
PublicKeyToken=1b03e6acf1164f73
SharpZip :00:00:04.3593750
Zlib :00:00:03.3750000
MONO 1.2.6 on Windows
mono neo:~/src/tests $ mono ./ziptest.exe zerofile.bin
ICSharpCode.SharpZipLib, Version=2.84.0.0, Culture=neutral,
PublicKeyToken=1b03e6acf1164f73
SharpZip :00:00:12.7190000
Zlib :00:00:01.5470000
The first line is the output of
Console.WriteLine (typeof (GZipOutputStream).Assembly);
=> the tests are using the same SharpZipLib version on both
runtimes.
* randomfile.bin (100MB) is reproducible, since it was generated
with a known seed using mono on the 2.0 profile:
using System;
using System.IO;
class Test
{
static void Main ()
{
Random rng = new Random (42);
byte[] bytes = new byte [1024 * 1024];
Stream stm = File.Create ("randomfile.bin");
for (int i = 0; i < 100; i++) {
rng.NextBytes (bytes);
stm.Write (bytes, 0, bytes.Length);
}
stm.Close ();
}
}
* logfile.txt (100MB) was taken from an apache log file.
* zerofile.bin is the output of
dd if=/dev/zero of=zerofile.bin count=100 bs=1048576
The results show that mono's performance degradation is related
to the compression rate of the data.
See zerofile.bin, where mono performs worst (relatively to MS.NET).
I'm aware that this doesn't help much, but someone who knows
the GZip algorithm should be able to deduce which parts of
the GZip code is performance-critical when zerofile.bin is processed.
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
More information about the mono-bugs
mailing list