Subject: Re: binary plist support
To: Jachym Holecek <freza@NetBSD.org>
From: Jachym Holecek <freza@NetBSD.org>
List: tech-kern
Date: 10/09/2007 16:59:51
# Jachym Holecek 2007-10-09:
> [... benchmark results ...]
It's been pointed to me the benchmark output was confusing, so I've
changed that to always output numbers for binary format relative to
XML (ie. XML measurements are considered to be 100%).
To answer another offlist question, XML is a bit faster for very small
and simple plists because binary externalizer needs more context and
bookeping (in particular, there's the object unification pass)... see
the corresponding samples, they're in regress/lib/libprop/samples/.
To explain a bit on the TRANSPORT test, as mentioned before it tries
to simulate the ioctl() protocol, so it's basically "externalize,
allocate new buffer, memcpy to new buffer, internalize from new
buffer". The RAW test, on the other hand, is simply the accumulated
time of "internalize + externalize", ie. no data copy involved.
Benchmark results in more readable form follow, this time with only
10000 loops per test (previously I used 300000, but the numbers don't
differ substantially).
Hope this makes things more clear,
-- Jachym
PASSED aa.xml TRANSPORT 66% RAW 70% SIZE 15%
PASSED ab.xml TRANSPORT 65% RAW 67% SIZE 17%
PASSED ac.xml TRANSPORT 63% RAW 66% SIZE 14%
PASSED ad.xml TRANSPORT 63% RAW 95% SIZE 29%
PASSED ae.xml TRANSPORT 67% RAW 68% SIZE 15%
PASSED af.xml TRANSPORT 87% RAW 90% SIZE 28%
PASSED ag.xml TRANSPORT 90% RAW 94% SIZE 32%
PASSED ah.xml TRANSPORT 88% RAW 79% SIZE 39%
PASSED ai.xml TRANSPORT 98% RAW 98% SIZE 40%
PASSED aj.xml TRANSPORT 54% RAW 69% SIZE 25%
PASSED ak.xml TRANSPORT 73% RAW 95% SIZE 28%
PASSED al.xml TRANSPORT 85% RAW 95% SIZE 37%
PASSED am.xml TRANSPORT 73% RAW 111% SIZE 36%
PASSED an.xml TRANSPORT 86% RAW 90% SIZE 54%
PASSED ao.xml TRANSPORT 109% RAW 134% SIZE 42%
PASSED ap.xml TRANSPORT 71% RAW 74% SIZE 30%
PASSED aq.xml TRANSPORT 92% RAW 96% SIZE 23%
PASSED ar.xml TRANSPORT 101% RAW 107% SIZE 26%
PASSED as.xml TRANSPORT 112% RAW 68% SIZE 30%
PASSED at.xml TRANSPORT 67% RAW 69% SIZE 26%
PASSED au.xml TRANSPORT 95% RAW 77% SIZE 40%
PASSED av.xml TRANSPORT 49% RAW 50% SIZE 27%
PASSED aw.xml TRANSPORT 49% RAW 49% SIZE 48%
PASSED ax.xml TRANSPORT 40% RAW 41% SIZE 47%
PASSED ay.xml TRANSPORT 95% RAW 103% SIZE 53%
PASSED az.xml TRANSPORT 101% RAW 94% SIZE 42%
PASSED ba.xml TRANSPORT 71% RAW 75% SIZE 29%