On 10 Jun 2016, at 19:34, Holger Freyther
<holger(a)freyther.de> wrote:
Will you provide the source + test data for your
benchmark? If not why not? A benchmark (and its result) is only useful if it is perfectly
clear of what has been measured and compared with each other. The easiest way to make that
clear is to provide the source and data (+ explanation on compiling/execution).
After going through the patch again, I see that you instrument a single call of the
decoding code? I don't think that this is a good approach to comparing the decoding
code. What I expected (and probably Harald as well) is:
* One collects some typical data (e.g. all data used during routing area update, pdp
context activation and then opening a common website, e.g. m.heise.de), alternative you
can use other compressed bitmaps if you can say how they represent a public page.
* Ones creates a bench_compressed_window.c with at least two paths:
** Call the existing code
** Call the new tree code
Initialize the code tree in both cases and one can use "time" to compare it.
E.g. the non-compiling skeleton like this:
struct test_data {
const uint8_t *data;
const size_t len;
const ... expected_result; // (what is the point if it is more quick if it does not
work)
};
static const struct test_data tests[] = {
TEST_DATA(data, NULL),..
};
static void test_old(int rounds, int verify)
{
while (rounds-- > 0) {
int i;
for (i = 0; i < ARRAY_SIZE(tests); ++i) {
call_old_code();
if (verify)
check_result();
}
}
}
static void test_new(int rounds, int verify)
{
while (rounds-- > 0) {
int i;
for (i = 0; i < ARRAY_SIZE(tests); ++i) {
call_new_code();
if (verify)
check_result();
}
}
}
int main()
{
initialize_tree();
...
if (new)
test_new(10000, 0)
else
test_old(10000, 0);
}