Date: Thu, 15 Jul 2010 17:03:30 +0200 From: Dimitry Andric <dimitry@andric.com> To: =?UTF-8?B?RGFnLUVybGluZyBTbcO4cmdyYXY=?= <des@des.no> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Marcel Moolenaar <marcel@FreeBSD.org>, src-committers@freebsd.org Subject: Re: svn commit: r210103 - head/lib/liblzma Message-ID: <4C3F2342.1030706@andric.com> In-Reply-To: <86630g4y61.fsf@ds4.des.no> References: <201007150311.o6F3B4bZ061614@svn.freebsd.org> <4C3EEEFB.8020902@andric.com> <86630g4y61.fsf@ds4.des.no>
next in thread | previous in thread | raw e-mail | index | archive | help
On 2010-07-15 16:28, Dag-Erling Sm=C3=B8rgrav wrote: > Misaligned accesses, especially writes, are slow on all architectures -= > but Marcel knows this, so I guess he has a reason for doing it this way= ? I did some unscientific tests here, on an i386 box, and it did not turn out to make too much difference, if at all. I repeatedly compressed a tar file containing an svn export of head (~537 MiB), using an 'aligned' xz and an 'unaligned' one: $ for i in 1 2 3 4 5; do time xz-aligned -z -9 -c test.tar > /dev/null; d= one real 8m42.535s user 8m27.231s sys 0m14.375s real 8m39.049s user 8m25.645s sys 0m12.686s real 9m53.560s user 9m30.045s sys 0m22.208s real 8m49.051s user 8m29.796s sys 0m18.200s real 8m35.901s user 8m18.468s sys 0m16.705s $ for i in 1 2 3 4 5; do time xz-unaligned -z -9 -c test.tar > /dev/null;= done real 8m36.547s user 8m20.673s sys 0m15.016s real 8m43.048s user 8m26.418s sys 0m15.627s real 8m40.850s user 8m24.624s sys 0m15.401s real 8m33.000s user 8m15.823s sys 0m16.547s real 8m37.786s user 8m21.952s sys 0m14.983s I don't see too much difference, except one weird outlier; that was probably caused by something else running concurrently on the system. Maybe there is more difference when you use some other type of data, such as less-compressible files, or a much larger set, but I did not test that.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4C3F2342.1030706>