From 9b2a5824503e462b6d91e97fbc88a9a19c311a6f Mon Sep 17 00:00:00 2001 From: "tg(x)" <*@tg-x.net> Date: Tue, 24 May 2011 21:48:35 +0200 Subject: [PATCH] bench: compact --- bench/benchmark.org | 26 ++++++++++---------------- bench/packets/presence-compact.psyc | 5 +++++ 2 files changed, 15 insertions(+), 16 deletions(-) create mode 100644 bench/packets/presence-compact.psyc diff --git a/bench/benchmark.org b/bench/benchmark.org index 29627dc..5d76ca0 100644 --- a/bench/benchmark.org +++ b/bench/benchmark.org @@ -87,13 +87,7 @@ need to be mentioned): And the same in compact form: -#+BEGIN_SRC psyc -:c psyc://example.com/~juliet - -=da 4 -np -| -#+END_SRC +#+INCLUDE: packets/presence-compact.psyc src psyc ** An average chat message @@ -140,19 +134,19 @@ These tests were performed on a 2.53 GHz Intel(R) Core(TM)2 Duo P9500 CPU. | json-unfriendly | 49 | 430 | 2328 | 10006 | 5141 | 7875 | 1751 | | xml-unfriendly | 37 | 296 | 2156 | 9591 | 5571 | 8769 | 1765 | |-----------------+--------+---------+--------+-----------+------------+--------+----------| -| / | < | > | < | > | < | | > | +| / | < | | < | > | < | | > | | | | | | | | | | Pure syntax comparisons above, protocol performance comparisons below: -| input: | PSYC | | JSON | | | XMPP | | -| parser: | strlen | libpsyc | json-c | json-glib | libxml sax | libxml | rapidxml | -|-----------------+--------+---------+--------+-----------+------------+--------+----------| -| presence | 30 | 236 | 2463 | 10016 | 4997 | 7557 | 1719 | -| chat msg | 40 | 295 | 2147 | 9526 | 5997 | 9777 | 1893 | -| activity | 42 | 353 | 4666 | 16327 | 13357 | 28858 | 4356 | -|-----------------+--------+---------+--------+-----------+------------+--------+----------| -| / | < | > | < | > | < | | > | +| input: | | PSYC | | JSON | | | XMPP | | +| parser: | strlen | libpsyc | compact | json-c | json-glib | libxml sax | libxml | rapidxml | +|----------+--------+---------+---------+--------+-----------+------------+--------+----------| +| presence | 30 | 236 | 122 | 2463 | 10016 | 4997 | 7557 | 1719 | +| chat msg | 40 | 295 | | 2147 | 9526 | 5997 | 9777 | 1893 | +| activity | 42 | 353 | | 4666 | 16327 | 13357 | 28858 | 4356 | +|----------+--------+---------+---------+--------+-----------+------------+--------+----------| +| / | < | | > | < | > | < | | > | Parsing large amounts of binary data. For JSON & XML base64 encoding was used. Note that the results below include only the parsing time, base64 decoding was diff --git a/bench/packets/presence-compact.psyc b/bench/packets/presence-compact.psyc new file mode 100644 index 0000000..eabd5d6 --- /dev/null +++ b/bench/packets/presence-compact.psyc @@ -0,0 +1,5 @@ +:c psyc://example.com/~juliet + +=da 4 +np +|