svn commit: r210103 - head/lib/liblzma

Dimitry Andric dimitry at andric.com
Thu Jul 15 15:03:31 UTC 2010


On 2010-07-15 16:28, Dag-Erling Smørgrav 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; done

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.



More information about the svn-src-all mailing list