Adds an introduction to the benchmark.

This commit is contained in:
Bertrand Bordage 2015-02-22 05:00:48 +01:00
parent b01000bb40
commit 3da5c92eaa
16 changed files with 5239 additions and 5208 deletions

View file

@ -85,6 +85,10 @@ def write_conditions():
))
with io.open(os.path.join('benchmark', 'conditions.rst'), 'w') as f:
f.write('In this benchmark, a small database is generated, '
'and each test is executed %s times '
'under the following conditions:\n\n' % Benchmark.n)
def write_table_sep(char='='):
f.write(''.ljust(20, char) + ' ' + ''.ljust(50, char) + '\n')
write_table_sep()
@ -112,8 +116,9 @@ class AssertNumQueries(CaptureQueriesContext):
class Benchmark(object):
def __init__(self, n=20):
self.n = n
n = 20
def __init__(self):
self.data = []
def bench_once(self, context, num_queries, invalidate_before=False):

View file

@ -31,8 +31,8 @@ z
<g id="patch_3">
<path clip-path="url(#p7ff5b81e1d)" d="
M72 72
L128.887 72
L128.887 83.52
L133.942 72
L133.942 83.52
L72 83.52
z
" style="fill:#0000ff;stroke:#000000;stroke-linejoin:miter;"/>
@ -40,8 +40,8 @@ z
<g id="patch_4">
<path clip-path="url(#p7ff5b81e1d)" d="
M72 187.2
L138.602 187.2
L138.602 198.72
L148.15 187.2
L148.15 198.72
L72 198.72
z
" style="fill:#0000ff;stroke:#000000;stroke-linejoin:miter;"/>
@ -49,8 +49,8 @@ z
<g id="patch_5">
<path clip-path="url(#p7ff5b81e1d)" d="
M72 302.4
L78.6463 302.4
L78.6463 313.92
L79.0426 302.4
L79.0426 313.92
L72 313.92
z
" style="fill:#0000ff;stroke:#000000;stroke-linejoin:miter;"/>
@ -58,8 +58,8 @@ z
<g id="patch_6">
<path clip-path="url(#p7ff5b81e1d)" d="
M72 83.52
L128.077 83.52
L128.077 95.04
L134.748 83.52
L134.748 95.04
L72 95.04
z
" style="fill:#008000;stroke:#000000;stroke-linejoin:miter;"/>
@ -67,8 +67,8 @@ z
<g id="patch_7">
<path clip-path="url(#p7ff5b81e1d)" d="
M72 198.72
L134.689 198.72
L134.689 210.24
L139.092 198.72
L139.092 210.24
L72 210.24
z
" style="fill:#008000;stroke:#000000;stroke-linejoin:miter;"/>
@ -76,8 +76,8 @@ z
<g id="patch_8">
<path clip-path="url(#p7ff5b81e1d)" d="
M72 313.92
L78.2338 313.92
L78.2338 325.44
L78.7306 313.92
L78.7306 325.44
L72 325.44
z
" style="fill:#008000;stroke:#000000;stroke-linejoin:miter;"/>
@ -85,8 +85,8 @@ z
<g id="patch_9">
<path clip-path="url(#p7ff5b81e1d)" d="
M72 95.04
L131.893 95.04
L131.893 106.56
L135.502 95.04
L135.502 106.56
L72 106.56
z
" style="fill:#ff0000;stroke:#000000;stroke-linejoin:miter;"/>
@ -94,8 +94,8 @@ z
<g id="patch_10">
<path clip-path="url(#p7ff5b81e1d)" d="
M72 210.24
L138.788 210.24
L138.788 221.76
L142.287 210.24
L142.287 221.76
L72 221.76
z
" style="fill:#ff0000;stroke:#000000;stroke-linejoin:miter;"/>
@ -103,8 +103,8 @@ z
<g id="patch_11">
<path clip-path="url(#p7ff5b81e1d)" d="
M72 325.44
L80.6371 325.44
L80.6371 336.96
L80.4779 325.44
L80.4779 336.96
L72 336.96
z
" style="fill:#ff0000;stroke:#000000;stroke-linejoin:miter;"/>
@ -112,8 +112,8 @@ z
<g id="patch_12">
<path clip-path="url(#p7ff5b81e1d)" d="
M72 106.56
L130.727 106.56
L130.727 118.08
L135.148 106.56
L135.148 118.08
L72 118.08
z
" style="fill:#00bfbf;stroke:#000000;stroke-linejoin:miter;"/>
@ -121,8 +121,8 @@ z
<g id="patch_13">
<path clip-path="url(#p7ff5b81e1d)" d="
M72 221.76
L134.526 221.76
L134.526 233.28
L141.356 221.76
L141.356 233.28
L72 233.28
z
" style="fill:#00bfbf;stroke:#000000;stroke-linejoin:miter;"/>
@ -130,8 +130,8 @@ z
<g id="patch_14">
<path clip-path="url(#p7ff5b81e1d)" d="
M72 336.96
L80.2993 336.96
L80.2993 348.48
L81.5263 336.96
L81.5263 348.48
L72 348.48
z
" style="fill:#00bfbf;stroke:#000000;stroke-linejoin:miter;"/>
@ -139,8 +139,8 @@ z
<g id="patch_15">
<path clip-path="url(#p7ff5b81e1d)" d="
M72 118.08
L135.603 118.08
L135.603 129.6
L134.831 118.08
L134.831 129.6
L72 129.6
z
" style="fill:#bf00bf;stroke:#000000;stroke-linejoin:miter;"/>
@ -148,8 +148,8 @@ z
<g id="patch_16">
<path clip-path="url(#p7ff5b81e1d)" d="
M72 233.28
L143.337 233.28
L143.337 244.8
L141.699 233.28
L141.699 244.8
L72 244.8
z
" style="fill:#bf00bf;stroke:#000000;stroke-linejoin:miter;"/>
@ -157,8 +157,8 @@ z
<g id="patch_17">
<path clip-path="url(#p7ff5b81e1d)" d="
M72 348.48
L79.7775 348.48
L79.7775 360
L80.2755 348.48
L80.2755 360
L72 360
z
" style="fill:#bf00bf;stroke:#000000;stroke-linejoin:miter;"/>
@ -166,111 +166,111 @@ z
<g id="LineCollection_1">
<defs>
<path d="
M73.008 -354.24
L487.874 -354.24" id="C0_0_53414d206e"/>
M72.98 -354.24
L394.14 -354.24" id="C0_0_3eeff6abe3"/>
<path d="
M77.7956 -239.04
L513.98 -239.04" id="C0_1_697c3afeb4"/>
M78.5039 -239.04
L427.664 -239.04" id="C0_1_06ae08e57d"/>
<path d="
M73.6102 -123.84
L105.833 -123.84" id="C0_2_e444b54b56"/>
M73.6023 -123.84
L108.634 -123.84" id="C0_2_dc4ec12640"/>
</defs>
<g clip-path="url(#p7ff5b81e1d)">
<use style="fill:none;stroke:#000000;" x="0.0" xlink:href="#C0_0_53414d206e" y="432.0"/>
<use style="fill:none;stroke:#000000;" x="0.0" xlink:href="#C0_0_3eeff6abe3" y="432.0"/>
</g>
<g clip-path="url(#p7ff5b81e1d)">
<use style="fill:none;stroke:#000000;" x="0.0" xlink:href="#C0_1_697c3afeb4" y="432.0"/>
<use style="fill:none;stroke:#000000;" x="0.0" xlink:href="#C0_1_06ae08e57d" y="432.0"/>
</g>
<g clip-path="url(#p7ff5b81e1d)">
<use style="fill:none;stroke:#000000;" x="0.0" xlink:href="#C0_2_e444b54b56" y="432.0"/>
<use style="fill:none;stroke:#000000;" x="0.0" xlink:href="#C0_2_dc4ec12640" y="432.0"/>
</g>
</g>
<g id="LineCollection_2">
<defs>
<path d="
M73.008 -342.72
L387.681 -342.72" id="C1_0_985da1d5d4"/>
M72.9368 -342.72
L397.272 -342.72" id="C1_0_b7265aee08"/>
<path d="
M74.9481 -227.52
L388.387 -227.52" id="C1_1_e11c068079"/>
M74.8263 -227.52
L429.756 -227.52" id="C1_1_3fa1e968e9"/>
<path d="
M73.4722 -112.32
L101.537 -112.32" id="C1_2_08f0bbae71"/>
M73.4605 -112.32
L108.98 -112.32" id="C1_2_89c248dd7f"/>
</defs>
<g clip-path="url(#p7ff5b81e1d)">
<use style="fill:none;stroke:#000000;" x="0.0" xlink:href="#C1_0_985da1d5d4" y="432.0"/>
<use style="fill:none;stroke:#000000;" x="0.0" xlink:href="#C1_0_b7265aee08" y="432.0"/>
</g>
<g clip-path="url(#p7ff5b81e1d)">
<use style="fill:none;stroke:#000000;" x="0.0" xlink:href="#C1_1_e11c068079" y="432.0"/>
<use style="fill:none;stroke:#000000;" x="0.0" xlink:href="#C1_1_3fa1e968e9" y="432.0"/>
</g>
<g clip-path="url(#p7ff5b81e1d)">
<use style="fill:none;stroke:#000000;" x="0.0" xlink:href="#C1_2_08f0bbae71" y="432.0"/>
<use style="fill:none;stroke:#000000;" x="0.0" xlink:href="#C1_2_89c248dd7f" y="432.0"/>
</g>
</g>
<g id="LineCollection_3">
<defs>
<path d="
M72.9623 -331.2
L458.238 -331.2" id="C2_0_87a8b400a3"/>
M72.964 -331.2
L416.063 -331.2" id="C2_0_76425fc5d6"/>
<path d="
M75.4726 -216
L458.572 -216" id="C2_1_52ba560b78"/>
M75.6495 -216
L440.145 -216" id="C2_1_62339a4c94"/>
<path d="
M74.1156 -100.8
L221.903 -100.8" id="C2_2_f92ea02a4d"/>
M74.157 -100.8
L122.307 -100.8" id="C2_2_4e23aa9a4e"/>
</defs>
<g clip-path="url(#p7ff5b81e1d)">
<use style="fill:none;stroke:#000000;" x="0.0" xlink:href="#C2_0_87a8b400a3" y="432.0"/>
<use style="fill:none;stroke:#000000;" x="0.0" xlink:href="#C2_0_76425fc5d6" y="432.0"/>
</g>
<g clip-path="url(#p7ff5b81e1d)">
<use style="fill:none;stroke:#000000;" x="0.0" xlink:href="#C2_1_52ba560b78" y="432.0"/>
<use style="fill:none;stroke:#000000;" x="0.0" xlink:href="#C2_1_62339a4c94" y="432.0"/>
</g>
<g clip-path="url(#p7ff5b81e1d)">
<use style="fill:none;stroke:#000000;" x="0.0" xlink:href="#C2_2_f92ea02a4d" y="432.0"/>
<use style="fill:none;stroke:#000000;" x="0.0" xlink:href="#C2_2_4e23aa9a4e" y="432.0"/>
</g>
</g>
<g id="LineCollection_4">
<defs>
<path d="
M73.008 -319.68
L474.229 -319.68" id="C3_0_4b46f1b5fd"/>
M73.0428 -319.68
L503.736 -319.68" id="C3_0_74ce46d70d"/>
<path d="
M75.0778 -204.48
L403.814 -204.48" id="C3_1_3438606f53"/>
M75.1924 -204.48
L455.618 -204.48" id="C3_1_f70f5e993d"/>
<path d="
M73.8286 -89.28
L215.21 -89.28" id="C3_2_d6b0d0cfe6"/>
M74.0472 -89.28
L231.504 -89.28" id="C3_2_2c8de3cacb"/>
</defs>
<g clip-path="url(#p7ff5b81e1d)">
<use style="fill:none;stroke:#000000;" x="0.0" xlink:href="#C3_0_4b46f1b5fd" y="432.0"/>
<use style="fill:none;stroke:#000000;" x="0.0" xlink:href="#C3_0_74ce46d70d" y="432.0"/>
</g>
<g clip-path="url(#p7ff5b81e1d)">
<use style="fill:none;stroke:#000000;" x="0.0" xlink:href="#C3_1_3438606f53" y="432.0"/>
<use style="fill:none;stroke:#000000;" x="0.0" xlink:href="#C3_1_f70f5e993d" y="432.0"/>
</g>
<g clip-path="url(#p7ff5b81e1d)">
<use style="fill:none;stroke:#000000;" x="0.0" xlink:href="#C3_2_d6b0d0cfe6" y="432.0"/>
<use style="fill:none;stroke:#000000;" x="0.0" xlink:href="#C3_2_2c8de3cacb" y="432.0"/>
</g>
</g>
<g id="LineCollection_5">
<defs>
<path d="
M73.0125 -308.16
L498.342 -308.16" id="C4_0_2781fec29f"/>
M72.949 -308.16
L513.98 -308.16" id="C4_0_4f81053a0e"/>
<path d="
M75.7066 -192.96
L501.056 -192.96" id="C4_1_a966df636b"/>
M75.52 -192.96
L425.369 -192.96" id="C4_1_2988779238"/>
<path d="
M73.8432 -77.76
L218.53 -77.76" id="C4_2_35c08d8ed9"/>
M73.9017 -77.76
L135.598 -77.76" id="C4_2_008f2dd301"/>
</defs>
<g clip-path="url(#p7ff5b81e1d)">
<use style="fill:none;stroke:#000000;" x="0.0" xlink:href="#C4_0_2781fec29f" y="432.0"/>
<use style="fill:none;stroke:#000000;" x="0.0" xlink:href="#C4_0_4f81053a0e" y="432.0"/>
</g>
<g clip-path="url(#p7ff5b81e1d)">
<use style="fill:none;stroke:#000000;" x="0.0" xlink:href="#C4_1_a966df636b" y="432.0"/>
<use style="fill:none;stroke:#000000;" x="0.0" xlink:href="#C4_1_2988779238" y="432.0"/>
</g>
<g clip-path="url(#p7ff5b81e1d)">
<use style="fill:none;stroke:#000000;" x="0.0" xlink:href="#C4_2_35c08d8ed9" y="432.0"/>
<use style="fill:none;stroke:#000000;" x="0.0" xlink:href="#C4_2_008f2dd301" y="432.0"/>
</g>
</g>
<g id="line2d_1">
@ -280,72 +280,72 @@ M0 3
L0 -3" id="mca62528ba1" style="stroke:#000000;stroke-width:0.5;"/>
</defs>
<g clip-path="url(#p7ff5b81e1d)">
<use style="stroke:#000000;stroke-width:0.5;" x="73.0079709839" xlink:href="#mca62528ba1" y="77.76"/>
<use style="stroke:#000000;stroke-width:0.5;" x="77.7956046965" xlink:href="#mca62528ba1" y="192.96"/>
<use style="stroke:#000000;stroke-width:0.5;" x="73.6101948084" xlink:href="#mca62528ba1" y="308.16"/>
<use style="stroke:#000000;stroke-width:0.5;" x="72.9799546511" xlink:href="#mca62528ba1" y="77.76"/>
<use style="stroke:#000000;stroke-width:0.5;" x="78.5039327369" xlink:href="#mca62528ba1" y="192.96"/>
<use style="stroke:#000000;stroke-width:0.5;" x="73.6022821737" xlink:href="#mca62528ba1" y="308.16"/>
</g>
</g>
<g id="line2d_2">
<g clip-path="url(#p7ff5b81e1d)">
<use style="stroke:#000000;stroke-width:0.5;" x="487.874389227" xlink:href="#mca62528ba1" y="77.76"/>
<use style="stroke:#000000;stroke-width:0.5;" x="513.98019802" xlink:href="#mca62528ba1" y="192.96"/>
<use style="stroke:#000000;stroke-width:0.5;" x="105.833281721" xlink:href="#mca62528ba1" y="308.16"/>
<use style="stroke:#000000;stroke-width:0.5;" x="394.140379809" xlink:href="#mca62528ba1" y="77.76"/>
<use style="stroke:#000000;stroke-width:0.5;" x="427.664403145" xlink:href="#mca62528ba1" y="192.96"/>
<use style="stroke:#000000;stroke-width:0.5;" x="108.633783642" xlink:href="#mca62528ba1" y="308.16"/>
</g>
</g>
<g id="line2d_3">
<g clip-path="url(#p7ff5b81e1d)">
<use style="stroke:#000000;stroke-width:0.5;" x="73.0079709839" xlink:href="#mca62528ba1" y="89.28"/>
<use style="stroke:#000000;stroke-width:0.5;" x="74.9480638207" xlink:href="#mca62528ba1" y="204.48"/>
<use style="stroke:#000000;stroke-width:0.5;" x="73.4722042204" xlink:href="#mca62528ba1" y="319.68"/>
<use style="stroke:#000000;stroke-width:0.5;" x="72.9367765726" xlink:href="#mca62528ba1" y="89.28"/>
<use style="stroke:#000000;stroke-width:0.5;" x="74.8262868337" xlink:href="#mca62528ba1" y="204.48"/>
<use style="stroke:#000000;stroke-width:0.5;" x="73.4605454378" xlink:href="#mca62528ba1" y="319.68"/>
</g>
</g>
<g id="line2d_4">
<g clip-path="url(#p7ff5b81e1d)">
<use style="stroke:#000000;stroke-width:0.5;" x="387.681342347" xlink:href="#mca62528ba1" y="89.28"/>
<use style="stroke:#000000;stroke-width:0.5;" x="388.386830651" xlink:href="#mca62528ba1" y="204.48"/>
<use style="stroke:#000000;stroke-width:0.5;" x="101.537296594" xlink:href="#mca62528ba1" y="319.68"/>
<use style="stroke:#000000;stroke-width:0.5;" x="397.271729154" xlink:href="#mca62528ba1" y="89.28"/>
<use style="stroke:#000000;stroke-width:0.5;" x="429.755723991" xlink:href="#mca62528ba1" y="204.48"/>
<use style="stroke:#000000;stroke-width:0.5;" x="108.980146924" xlink:href="#mca62528ba1" y="319.68"/>
</g>
</g>
<g id="line2d_5">
<g clip-path="url(#p7ff5b81e1d)">
<use style="stroke:#000000;stroke-width:0.5;" x="72.9622787363" xlink:href="#mca62528ba1" y="100.8"/>
<use style="stroke:#000000;stroke-width:0.5;" x="75.4726108241" xlink:href="#mca62528ba1" y="216.0"/>
<use style="stroke:#000000;stroke-width:0.5;" x="74.1155510679" xlink:href="#mca62528ba1" y="331.2"/>
<use style="stroke:#000000;stroke-width:0.5;" x="72.9639975351" xlink:href="#mca62528ba1" y="100.8"/>
<use style="stroke:#000000;stroke-width:0.5;" x="75.6494862868" xlink:href="#mca62528ba1" y="216.0"/>
<use style="stroke:#000000;stroke-width:0.5;" x="74.157026617" xlink:href="#mca62528ba1" y="331.2"/>
</g>
</g>
<g id="line2d_6">
<g clip-path="url(#p7ff5b81e1d)">
<use style="stroke:#000000;stroke-width:0.5;" x="458.238397378" xlink:href="#mca62528ba1" y="100.8"/>
<use style="stroke:#000000;stroke-width:0.5;" x="458.571950786" xlink:href="#mca62528ba1" y="216.0"/>
<use style="stroke:#000000;stroke-width:0.5;" x="221.902556983" xlink:href="#mca62528ba1" y="331.2"/>
<use style="stroke:#000000;stroke-width:0.5;" x="416.062641184" xlink:href="#mca62528ba1" y="100.8"/>
<use style="stroke:#000000;stroke-width:0.5;" x="440.144745138" xlink:href="#mca62528ba1" y="216.0"/>
<use style="stroke:#000000;stroke-width:0.5;" x="122.307154717" xlink:href="#mca62528ba1" y="331.2"/>
</g>
</g>
<g id="line2d_7">
<g clip-path="url(#p7ff5b81e1d)">
<use style="stroke:#000000;stroke-width:0.5;" x="73.0079709839" xlink:href="#mca62528ba1" y="112.32"/>
<use style="stroke:#000000;stroke-width:0.5;" x="75.0778298041" xlink:href="#mca62528ba1" y="227.52"/>
<use style="stroke:#000000;stroke-width:0.5;" x="73.8286037524" xlink:href="#mca62528ba1" y="342.72"/>
<use style="stroke:#000000;stroke-width:0.5;" x="73.0428444611" xlink:href="#mca62528ba1" y="112.32"/>
<use style="stroke:#000000;stroke-width:0.5;" x="75.192361847" xlink:href="#mca62528ba1" y="227.52"/>
<use style="stroke:#000000;stroke-width:0.5;" x="74.047204113" xlink:href="#mca62528ba1" y="342.72"/>
</g>
</g>
<g id="line2d_8">
<g clip-path="url(#p7ff5b81e1d)">
<use style="stroke:#000000;stroke-width:0.5;" x="474.228856378" xlink:href="#mca62528ba1" y="112.32"/>
<use style="stroke:#000000;stroke-width:0.5;" x="403.814361159" xlink:href="#mca62528ba1" y="227.52"/>
<use style="stroke:#000000;stroke-width:0.5;" x="215.210470387" xlink:href="#mca62528ba1" y="342.72"/>
<use style="stroke:#000000;stroke-width:0.5;" x="503.73572957" xlink:href="#mca62528ba1" y="112.32"/>
<use style="stroke:#000000;stroke-width:0.5;" x="455.617515702" xlink:href="#mca62528ba1" y="227.52"/>
<use style="stroke:#000000;stroke-width:0.5;" x="231.503576578" xlink:href="#mca62528ba1" y="342.72"/>
</g>
</g>
<g id="line2d_9">
<g clip-path="url(#p7ff5b81e1d)">
<use style="stroke:#000000;stroke-width:0.5;" x="73.0125402087" xlink:href="#mca62528ba1" y="123.84"/>
<use style="stroke:#000000;stroke-width:0.5;" x="75.7065551323" xlink:href="#mca62528ba1" y="239.04"/>
<use style="stroke:#000000;stroke-width:0.5;" x="73.8432252716" xlink:href="#mca62528ba1" y="354.24"/>
<use style="stroke:#000000;stroke-width:0.5;" x="72.948979073" xlink:href="#mca62528ba1" y="123.84"/>
<use style="stroke:#000000;stroke-width:0.5;" x="75.5199520513" xlink:href="#mca62528ba1" y="239.04"/>
<use style="stroke:#000000;stroke-width:0.5;" x="73.9017127616" xlink:href="#mca62528ba1" y="354.24"/>
</g>
</g>
<g id="line2d_10">
<g clip-path="url(#p7ff5b81e1d)">
<use style="stroke:#000000;stroke-width:0.5;" x="498.342483172" xlink:href="#mca62528ba1" y="123.84"/>
<use style="stroke:#000000;stroke-width:0.5;" x="501.055688839" xlink:href="#mca62528ba1" y="239.04"/>
<use style="stroke:#000000;stroke-width:0.5;" x="218.529555259" xlink:href="#mca62528ba1" y="354.24"/>
<use style="stroke:#000000;stroke-width:0.5;" x="513.98019802" xlink:href="#mca62528ba1" y="123.84"/>
<use style="stroke:#000000;stroke-width:0.5;" x="425.369394408" xlink:href="#mca62528ba1" y="239.04"/>
<use style="stroke:#000000;stroke-width:0.5;" x="135.598493662" xlink:href="#mca62528ba1" y="354.24"/>
</g>
</g>
<g id="line2d_11">
@ -441,17 +441,17 @@ z
<g id="xtick_2">
<g id="line2d_15">
<path clip-path="url(#p7ff5b81e1d)" d="
M148.659 388.8
L148.659 43.2" style="fill:none;stroke:#000000;stroke-dasharray:1.000000,3.000000;stroke-dashoffset:0.0;stroke-width:0.5;"/>
M150.74 388.8
L150.74 43.2" style="fill:none;stroke:#000000;stroke-dasharray:1.000000,3.000000;stroke-dashoffset:0.0;stroke-width:0.5;"/>
</g>
<g id="line2d_16">
<g>
<use style="stroke:#000000;stroke-width:0.5;" x="148.658870895" xlink:href="#m93b0483c22" y="388.8"/>
<use style="stroke:#000000;stroke-width:0.5;" x="150.739994498" xlink:href="#m93b0483c22" y="388.8"/>
</g>
</g>
<g id="line2d_17">
<g>
<use style="stroke:#000000;stroke-width:0.5;" x="148.658870895" xlink:href="#m741efc42ff" y="43.2"/>
<use style="stroke:#000000;stroke-width:0.5;" x="150.739994498" xlink:href="#m741efc42ff" y="43.2"/>
</g>
</g>
<g id="text_2">
@ -481,7 +481,7 @@ Q49.8594 40.875 45.4062 35.4062
Q44.1875 33.9844 37.6406 27.2188
Q31.1094 20.4531 19.1875 8.29688" id="BitstreamVeraSans-Roman-32"/>
</defs>
<g transform="translate(136.296058395 401.918125)scale(0.12 -0.12)">
<g transform="translate(138.377181998 401.918125)scale(0.12 -0.12)">
<use xlink:href="#BitstreamVeraSans-Roman-30"/>
<use x="63.623046875" xlink:href="#BitstreamVeraSans-Roman-2e"/>
<use x="95.41015625" xlink:href="#BitstreamVeraSans-Roman-30"/>
@ -492,17 +492,17 @@ Q31.1094 20.4531 19.1875 8.29688" id="BitstreamVeraSans-Roman-32"/>
<g id="xtick_3">
<g id="line2d_18">
<path clip-path="url(#p7ff5b81e1d)" d="
M225.318 388.8
L225.318 43.2" style="fill:none;stroke:#000000;stroke-dasharray:1.000000,3.000000;stroke-dashoffset:0.0;stroke-width:0.5;"/>
M229.48 388.8
L229.48 43.2" style="fill:none;stroke:#000000;stroke-dasharray:1.000000,3.000000;stroke-dashoffset:0.0;stroke-width:0.5;"/>
</g>
<g id="line2d_19">
<g>
<use style="stroke:#000000;stroke-width:0.5;" x="225.31774179" xlink:href="#m93b0483c22" y="388.8"/>
<use style="stroke:#000000;stroke-width:0.5;" x="229.479988997" xlink:href="#m93b0483c22" y="388.8"/>
</g>
</g>
<g id="line2d_20">
<g>
<use style="stroke:#000000;stroke-width:0.5;" x="225.31774179" xlink:href="#m741efc42ff" y="43.2"/>
<use style="stroke:#000000;stroke-width:0.5;" x="229.479988997" xlink:href="#m741efc42ff" y="43.2"/>
</g>
</g>
<g id="text_3">
@ -528,7 +528,7 @@ L4.89062 26.7031
z
" id="BitstreamVeraSans-Roman-34"/>
</defs>
<g transform="translate(212.69055429 401.918125)scale(0.12 -0.12)">
<g transform="translate(216.852801497 401.918125)scale(0.12 -0.12)">
<use xlink:href="#BitstreamVeraSans-Roman-30"/>
<use x="63.623046875" xlink:href="#BitstreamVeraSans-Roman-2e"/>
<use x="95.41015625" xlink:href="#BitstreamVeraSans-Roman-30"/>
@ -539,17 +539,17 @@ z
<g id="xtick_4">
<g id="line2d_21">
<path clip-path="url(#p7ff5b81e1d)" d="
M301.977 388.8
L301.977 43.2" style="fill:none;stroke:#000000;stroke-dasharray:1.000000,3.000000;stroke-dashoffset:0.0;stroke-width:0.5;"/>
M308.22 388.8
L308.22 43.2" style="fill:none;stroke:#000000;stroke-dasharray:1.000000,3.000000;stroke-dashoffset:0.0;stroke-width:0.5;"/>
</g>
<g id="line2d_22">
<g>
<use style="stroke:#000000;stroke-width:0.5;" x="301.976612685" xlink:href="#m93b0483c22" y="388.8"/>
<use style="stroke:#000000;stroke-width:0.5;" x="308.219983495" xlink:href="#m93b0483c22" y="388.8"/>
</g>
</g>
<g id="line2d_23">
<g>
<use style="stroke:#000000;stroke-width:0.5;" x="301.976612685" xlink:href="#m741efc42ff" y="43.2"/>
<use style="stroke:#000000;stroke-width:0.5;" x="308.219983495" xlink:href="#m741efc42ff" y="43.2"/>
</g>
</g>
<g id="text_4">
@ -584,7 +584,7 @@ Q23.3906 74.2188 37.2031 74.2188
Q40.9219 74.2188 44.7031 73.4844
Q48.4844 72.75 52.5938 71.2969" id="BitstreamVeraSans-Roman-36"/>
</defs>
<g transform="translate(289.390675185 401.918125)scale(0.12 -0.12)">
<g transform="translate(295.634045995 401.918125)scale(0.12 -0.12)">
<use xlink:href="#BitstreamVeraSans-Roman-30"/>
<use x="63.623046875" xlink:href="#BitstreamVeraSans-Roman-2e"/>
<use x="95.41015625" xlink:href="#BitstreamVeraSans-Roman-30"/>
@ -595,17 +595,17 @@ Q48.4844 72.75 52.5938 71.2969" id="BitstreamVeraSans-Roman-36"/>
<g id="xtick_5">
<g id="line2d_24">
<path clip-path="url(#p7ff5b81e1d)" d="
M378.635 388.8
L378.635 43.2" style="fill:none;stroke:#000000;stroke-dasharray:1.000000,3.000000;stroke-dashoffset:0.0;stroke-width:0.5;"/>
M386.96 388.8
L386.96 43.2" style="fill:none;stroke:#000000;stroke-dasharray:1.000000,3.000000;stroke-dashoffset:0.0;stroke-width:0.5;"/>
</g>
<g id="line2d_25">
<g>
<use style="stroke:#000000;stroke-width:0.5;" x="378.63548358" xlink:href="#m93b0483c22" y="388.8"/>
<use style="stroke:#000000;stroke-width:0.5;" x="386.959977994" xlink:href="#m93b0483c22" y="388.8"/>
</g>
</g>
<g id="line2d_26">
<g>
<use style="stroke:#000000;stroke-width:0.5;" x="378.63548358" xlink:href="#m741efc42ff" y="43.2"/>
<use style="stroke:#000000;stroke-width:0.5;" x="386.959977994" xlink:href="#m741efc42ff" y="43.2"/>
</g>
</g>
<g id="text_5">
@ -648,7 +648,7 @@ Q38.1406 66.4062 31.7812 66.4062
Q25.3906 66.4062 21.8438 63.2344
Q18.3125 60.0625 18.3125 54.3906" id="BitstreamVeraSans-Roman-38"/>
</defs>
<g transform="translate(366.08235858 401.918125)scale(0.12 -0.12)">
<g transform="translate(374.406852994 401.918125)scale(0.12 -0.12)">
<use xlink:href="#BitstreamVeraSans-Roman-30"/>
<use x="63.623046875" xlink:href="#BitstreamVeraSans-Roman-2e"/>
<use x="95.41015625" xlink:href="#BitstreamVeraSans-Roman-30"/>
@ -659,17 +659,17 @@ Q18.3125 60.0625 18.3125 54.3906" id="BitstreamVeraSans-Roman-38"/>
<g id="xtick_6">
<g id="line2d_27">
<path clip-path="url(#p7ff5b81e1d)" d="
M455.294 388.8
L455.294 43.2" style="fill:none;stroke:#000000;stroke-dasharray:1.000000,3.000000;stroke-dashoffset:0.0;stroke-width:0.5;"/>
M465.7 388.8
L465.7 43.2" style="fill:none;stroke:#000000;stroke-dasharray:1.000000,3.000000;stroke-dashoffset:0.0;stroke-width:0.5;"/>
</g>
<g id="line2d_28">
<g>
<use style="stroke:#000000;stroke-width:0.5;" x="455.294354475" xlink:href="#m93b0483c22" y="388.8"/>
<use style="stroke:#000000;stroke-width:0.5;" x="465.699972492" xlink:href="#m93b0483c22" y="388.8"/>
</g>
</g>
<g id="line2d_29">
<g>
<use style="stroke:#000000;stroke-width:0.5;" x="455.294354475" xlink:href="#m741efc42ff" y="43.2"/>
<use style="stroke:#000000;stroke-width:0.5;" x="465.699972492" xlink:href="#m741efc42ff" y="43.2"/>
</g>
</g>
<g id="text_6">
@ -690,7 +690,7 @@ L12.4062 0
z
" id="BitstreamVeraSans-Roman-31"/>
</defs>
<g transform="translate(442.729041975 401.918125)scale(0.12 -0.12)">
<g transform="translate(453.134659992 401.918125)scale(0.12 -0.12)">
<use xlink:href="#BitstreamVeraSans-Roman-30"/>
<use x="63.623046875" xlink:href="#BitstreamVeraSans-Roman-2e"/>
<use x="95.41015625" xlink:href="#BitstreamVeraSans-Roman-31"/>

Before

Width:  |  Height:  |  Size: 42 KiB

After

Width:  |  Height:  |  Size: 42 KiB

File diff suppressed because it is too large Load diff

Before

Width:  |  Height:  |  Size: 219 KiB

After

Width:  |  Height:  |  Size: 219 KiB

File diff suppressed because it is too large Load diff

Before

Width:  |  Height:  |  Size: 219 KiB

After

Width:  |  Height:  |  Size: 219 KiB

File diff suppressed because it is too large Load diff

Before

Width:  |  Height:  |  Size: 219 KiB

After

Width:  |  Height:  |  Size: 219 KiB

File diff suppressed because it is too large Load diff

Before

Width:  |  Height:  |  Size: 219 KiB

After

Width:  |  Height:  |  Size: 219 KiB

File diff suppressed because it is too large Load diff

Before

Width:  |  Height:  |  Size: 219 KiB

After

Width:  |  Height:  |  Size: 219 KiB

View file

@ -1,5 +1,5 @@
- filebased is 1.2× slower then 8.6× faster
- locmem is 1.1× slower then 9.0× faster
- memcached is 1.1× slower then 6.9× faster
- pylibmc is 1.1× slower then 7.1× faster
- redis is 1.1× slower then 8.2× faster
- filebased is 1.2× slower then 8.8× faster
- locmem is 1.1× slower then 9.3× faster
- memcached is 1.1× slower then 7.5× faster
- pylibmc is 1.1× slower then 6.6× faster
- redis is 1.1× slower then 7.6× faster

View file

@ -1,3 +1,5 @@
In this benchmark, a small database is generated, and each test is executed 20 times under the following conditions:
==================== ==================================================
CPU Intel(R) Core(TM) i7-2670QM CPU @ 2.20GHz
RAM 12281228 kB

View file

@ -31,8 +31,8 @@ z
<g id="patch_3">
<path clip-path="url(#p7ff5b81e1d)" d="
M72 72
L79.0932 72
L79.0932 91.2
L79.3802 72
L79.3802 91.2
L72 91.2
z
" style="fill:#0000ff;stroke:#000000;stroke-linejoin:miter;"/>
@ -40,8 +40,8 @@ z
<g id="patch_4">
<path clip-path="url(#p7ff5b81e1d)" d="
M72 187.2
L85.5518 187.2
L85.5518 206.4
L87.2324 187.2
L87.2324 206.4
L72 206.4
z
" style="fill:#0000ff;stroke:#000000;stroke-linejoin:miter;"/>
@ -49,8 +49,8 @@ z
<g id="patch_5">
<path clip-path="url(#p7ff5b81e1d)" d="
M72 302.4
L79.9578 302.4
L79.9578 321.6
L80.3026 302.4
L80.3026 321.6
L72 321.6
z
" style="fill:#0000ff;stroke:#000000;stroke-linejoin:miter;"/>
@ -58,8 +58,8 @@ z
<g id="patch_6">
<path clip-path="url(#p7ff5b81e1d)" d="
M72 91.2
L176.943 91.2
L176.943 110.4
L190.052 91.2
L190.052 110.4
L72 110.4
z
" style="fill:#008000;stroke:#000000;stroke-linejoin:miter;"/>
@ -67,8 +67,8 @@ z
<g id="patch_7">
<path clip-path="url(#p7ff5b81e1d)" d="
M72 206.4
L182.944 206.4
L182.944 225.6
L197.876 206.4
L197.876 225.6
L72 225.6
z
" style="fill:#008000;stroke:#000000;stroke-linejoin:miter;"/>
@ -76,8 +76,8 @@ z
<g id="patch_8">
<path clip-path="url(#p7ff5b81e1d)" d="
M72 321.6
L79.7049 321.6
L79.7049 340.8
L80.2844 321.6
L80.2844 340.8
L72 340.8
z
" style="fill:#008000;stroke:#000000;stroke-linejoin:miter;"/>
@ -85,8 +85,8 @@ z
<g id="patch_9">
<path clip-path="url(#p7ff5b81e1d)" d="
M72 110.4
L137.076 110.4
L137.076 129.6
L135.071 110.4
L135.071 129.6
L72 129.6
z
" style="fill:#ff0000;stroke:#000000;stroke-linejoin:miter;"/>
@ -94,8 +94,8 @@ z
<g id="patch_10">
<path clip-path="url(#p7ff5b81e1d)" d="
M72 225.6
L145.468 225.6
L145.468 244.8
L142.442 225.6
L142.442 244.8
L72 244.8
z
" style="fill:#ff0000;stroke:#000000;stroke-linejoin:miter;"/>
@ -103,8 +103,8 @@ z
<g id="patch_11">
<path clip-path="url(#p7ff5b81e1d)" d="
M72 340.8
L78.8938 340.8
L78.8938 360
L79.4448 340.8
L79.4448 360
L72 360
z
" style="fill:#ff0000;stroke:#000000;stroke-linejoin:miter;"/>
@ -112,67 +112,67 @@ z
<g id="LineCollection_1">
<defs>
<path d="
M73.0582 -350.4
L134.166 -350.4" id="C0_0_a7284d88f8"/>
M73.0748 -350.4
L137.118 -350.4" id="C0_0_cfd1b4ca54"/>
<path d="
M74.9819 -235.2
L161.641 -235.2" id="C0_1_4d821e333f"/>
M75.122 -235.2
L237.519 -235.2" id="C0_1_e59e17eaec"/>
<path d="
M73.4722 -120
L215.21 -120" id="C0_2_6a94960c44"/>
M73.591 -120
L231.504 -120" id="C0_2_296d722281"/>
</defs>
<g clip-path="url(#p7ff5b81e1d)">
<use style="fill:none;stroke:#000000;" x="0.0" xlink:href="#C0_0_a7284d88f8" y="432.0"/>
<use style="fill:none;stroke:#000000;" x="0.0" xlink:href="#C0_0_cfd1b4ca54" y="432.0"/>
</g>
<g clip-path="url(#p7ff5b81e1d)">
<use style="fill:none;stroke:#000000;" x="0.0" xlink:href="#C0_1_4d821e333f" y="432.0"/>
<use style="fill:none;stroke:#000000;" x="0.0" xlink:href="#C0_1_e59e17eaec" y="432.0"/>
</g>
<g clip-path="url(#p7ff5b81e1d)">
<use style="fill:none;stroke:#000000;" x="0.0" xlink:href="#C0_2_6a94960c44" y="432.0"/>
<use style="fill:none;stroke:#000000;" x="0.0" xlink:href="#C0_2_296d722281" y="432.0"/>
</g>
</g>
<g id="LineCollection_2">
<defs>
<path d="
M74.2115 -331.2
L498.342 -331.2" id="C1_0_47dd06c5b7"/>
M74.3898 -331.2
L513.98 -331.2" id="C1_0_689a87c171"/>
<path d="
M77.3277 -216
L513.98 -216" id="C1_1_9cc299f9b9"/>
M77.5512 -216
L455.618 -216" id="C1_1_a40c4c1e83"/>
<path d="
M73.5444 -100.8
L221.903 -100.8" id="C1_2_198f419b16"/>
M73.5938 -100.8
L124.012 -100.8" id="C1_2_064f809aec"/>
</defs>
<g clip-path="url(#p7ff5b81e1d)">
<use style="fill:none;stroke:#000000;" x="0.0" xlink:href="#C1_0_47dd06c5b7" y="432.0"/>
<use style="fill:none;stroke:#000000;" x="0.0" xlink:href="#C1_0_689a87c171" y="432.0"/>
</g>
<g clip-path="url(#p7ff5b81e1d)">
<use style="fill:none;stroke:#000000;" x="0.0" xlink:href="#C1_1_9cc299f9b9" y="432.0"/>
<use style="fill:none;stroke:#000000;" x="0.0" xlink:href="#C1_1_a40c4c1e83" y="432.0"/>
</g>
<g clip-path="url(#p7ff5b81e1d)">
<use style="fill:none;stroke:#000000;" x="0.0" xlink:href="#C1_2_198f419b16" y="432.0"/>
<use style="fill:none;stroke:#000000;" x="0.0" xlink:href="#C1_2_064f809aec" y="432.0"/>
</g>
</g>
<g id="LineCollection_3">
<defs>
<path d="
M72.9623 -312
L274.005 -312" id="C2_0_36293a9eee"/>
M72.9368 -312
L277.7 -312" id="C2_0_2983559412"/>
<path d="
M74.9481 -196.8
L335.645 -196.8" id="C2_1_13300cfb53"/>
M74.8263 -196.8
L275.503 -196.8" id="C2_1_e3d686a1db"/>
<path d="
M73.5755 -81.6
L201.921 -81.6" id="C2_2_075ae5c0cf"/>
M73.4605 -81.6
L136.811 -81.6" id="C2_2_4ac981fa19"/>
</defs>
<g clip-path="url(#p7ff5b81e1d)">
<use style="fill:none;stroke:#000000;" x="0.0" xlink:href="#C2_0_36293a9eee" y="432.0"/>
<use style="fill:none;stroke:#000000;" x="0.0" xlink:href="#C2_0_2983559412" y="432.0"/>
</g>
<g clip-path="url(#p7ff5b81e1d)">
<use style="fill:none;stroke:#000000;" x="0.0" xlink:href="#C2_1_13300cfb53" y="432.0"/>
<use style="fill:none;stroke:#000000;" x="0.0" xlink:href="#C2_1_e3d686a1db" y="432.0"/>
</g>
<g clip-path="url(#p7ff5b81e1d)">
<use style="fill:none;stroke:#000000;" x="0.0" xlink:href="#C2_2_075ae5c0cf" y="432.0"/>
<use style="fill:none;stroke:#000000;" x="0.0" xlink:href="#C2_2_4ac981fa19" y="432.0"/>
</g>
</g>
<g id="line2d_1">
@ -182,44 +182,44 @@ M0 3
L0 -3" id="mca62528ba1" style="stroke:#000000;stroke-width:0.5;"/>
</defs>
<g clip-path="url(#p7ff5b81e1d)">
<use style="stroke:#000000;stroke-width:0.5;" x="73.0582324564" xlink:href="#mca62528ba1" y="81.6"/>
<use style="stroke:#000000;stroke-width:0.5;" x="74.981876084" xlink:href="#mca62528ba1" y="196.8"/>
<use style="stroke:#000000;stroke-width:0.5;" x="73.4722042204" xlink:href="#mca62528ba1" y="312.0"/>
<use style="stroke:#000000;stroke-width:0.5;" x="73.074758693" xlink:href="#mca62528ba1" y="81.6"/>
<use style="stroke:#000000;stroke-width:0.5;" x="75.121962806" xlink:href="#mca62528ba1" y="196.8"/>
<use style="stroke:#000000;stroke-width:0.5;" x="73.5910183272" xlink:href="#mca62528ba1" y="312.0"/>
</g>
</g>
<g id="line2d_2">
<g clip-path="url(#p7ff5b81e1d)">
<use style="stroke:#000000;stroke-width:0.5;" x="134.166130666" xlink:href="#mca62528ba1" y="81.6"/>
<use style="stroke:#000000;stroke-width:0.5;" x="161.6408792" xlink:href="#mca62528ba1" y="196.8"/>
<use style="stroke:#000000;stroke-width:0.5;" x="215.210470387" xlink:href="#mca62528ba1" y="312.0"/>
<use style="stroke:#000000;stroke-width:0.5;" x="137.118174295" xlink:href="#mca62528ba1" y="81.6"/>
<use style="stroke:#000000;stroke-width:0.5;" x="237.519409297" xlink:href="#mca62528ba1" y="196.8"/>
<use style="stroke:#000000;stroke-width:0.5;" x="231.503576578" xlink:href="#mca62528ba1" y="312.0"/>
</g>
</g>
<g id="line2d_3">
<g clip-path="url(#p7ff5b81e1d)">
<use style="stroke:#000000;stroke-width:0.5;" x="74.211504788" xlink:href="#mca62528ba1" y="100.8"/>
<use style="stroke:#000000;stroke-width:0.5;" x="77.3277160802" xlink:href="#mca62528ba1" y="216.0"/>
<use style="stroke:#000000;stroke-width:0.5;" x="73.5443979718" xlink:href="#mca62528ba1" y="331.2"/>
<use style="stroke:#000000;stroke-width:0.5;" x="74.3898127793" xlink:href="#mca62528ba1" y="100.8"/>
<use style="stroke:#000000;stroke-width:0.5;" x="77.5511990483" xlink:href="#mca62528ba1" y="216.0"/>
<use style="stroke:#000000;stroke-width:0.5;" x="73.5938342888" xlink:href="#mca62528ba1" y="331.2"/>
</g>
</g>
<g id="line2d_4">
<g clip-path="url(#p7ff5b81e1d)">
<use style="stroke:#000000;stroke-width:0.5;" x="498.342483172" xlink:href="#mca62528ba1" y="100.8"/>
<use style="stroke:#000000;stroke-width:0.5;" x="513.98019802" xlink:href="#mca62528ba1" y="216.0"/>
<use style="stroke:#000000;stroke-width:0.5;" x="221.902556983" xlink:href="#mca62528ba1" y="331.2"/>
<use style="stroke:#000000;stroke-width:0.5;" x="513.98019802" xlink:href="#mca62528ba1" y="100.8"/>
<use style="stroke:#000000;stroke-width:0.5;" x="455.617515702" xlink:href="#mca62528ba1" y="216.0"/>
<use style="stroke:#000000;stroke-width:0.5;" x="124.011750163" xlink:href="#mca62528ba1" y="331.2"/>
</g>
</g>
<g id="line2d_5">
<g clip-path="url(#p7ff5b81e1d)">
<use style="stroke:#000000;stroke-width:0.5;" x="72.9622787363" xlink:href="#mca62528ba1" y="120.0"/>
<use style="stroke:#000000;stroke-width:0.5;" x="74.9480638207" xlink:href="#mca62528ba1" y="235.2"/>
<use style="stroke:#000000;stroke-width:0.5;" x="73.5754687002" xlink:href="#mca62528ba1" y="350.4"/>
<use style="stroke:#000000;stroke-width:0.5;" x="72.9367765726" xlink:href="#mca62528ba1" y="120.0"/>
<use style="stroke:#000000;stroke-width:0.5;" x="74.8262868337" xlink:href="#mca62528ba1" y="235.2"/>
<use style="stroke:#000000;stroke-width:0.5;" x="73.4605454378" xlink:href="#mca62528ba1" y="350.4"/>
</g>
</g>
<g id="line2d_6">
<g clip-path="url(#p7ff5b81e1d)">
<use style="stroke:#000000;stroke-width:0.5;" x="274.004513174" xlink:href="#mca62528ba1" y="120.0"/>
<use style="stroke:#000000;stroke-width:0.5;" x="335.645182992" xlink:href="#mca62528ba1" y="235.2"/>
<use style="stroke:#000000;stroke-width:0.5;" x="201.92133707" xlink:href="#mca62528ba1" y="350.4"/>
<use style="stroke:#000000;stroke-width:0.5;" x="277.700365953" xlink:href="#mca62528ba1" y="120.0"/>
<use style="stroke:#000000;stroke-width:0.5;" x="275.502977219" xlink:href="#mca62528ba1" y="235.2"/>
<use style="stroke:#000000;stroke-width:0.5;" x="136.811234476" xlink:href="#mca62528ba1" y="350.4"/>
</g>
</g>
<g id="line2d_7">
@ -315,17 +315,17 @@ z
<g id="xtick_2">
<g id="line2d_11">
<path clip-path="url(#p7ff5b81e1d)" d="
M148.659 388.8
L148.659 43.2" style="fill:none;stroke:#000000;stroke-dasharray:1.000000,3.000000;stroke-dashoffset:0.0;stroke-width:0.5;"/>
M150.74 388.8
L150.74 43.2" style="fill:none;stroke:#000000;stroke-dasharray:1.000000,3.000000;stroke-dashoffset:0.0;stroke-width:0.5;"/>
</g>
<g id="line2d_12">
<g>
<use style="stroke:#000000;stroke-width:0.5;" x="148.658870895" xlink:href="#m93b0483c22" y="388.8"/>
<use style="stroke:#000000;stroke-width:0.5;" x="150.739994498" xlink:href="#m93b0483c22" y="388.8"/>
</g>
</g>
<g id="line2d_13">
<g>
<use style="stroke:#000000;stroke-width:0.5;" x="148.658870895" xlink:href="#m741efc42ff" y="43.2"/>
<use style="stroke:#000000;stroke-width:0.5;" x="150.739994498" xlink:href="#m741efc42ff" y="43.2"/>
</g>
</g>
<g id="text_2">
@ -355,7 +355,7 @@ Q49.8594 40.875 45.4062 35.4062
Q44.1875 33.9844 37.6406 27.2188
Q31.1094 20.4531 19.1875 8.29688" id="BitstreamVeraSans-Roman-32"/>
</defs>
<g transform="translate(136.296058395 401.918125)scale(0.12 -0.12)">
<g transform="translate(138.377181998 401.918125)scale(0.12 -0.12)">
<use xlink:href="#BitstreamVeraSans-Roman-30"/>
<use x="63.623046875" xlink:href="#BitstreamVeraSans-Roman-2e"/>
<use x="95.41015625" xlink:href="#BitstreamVeraSans-Roman-30"/>
@ -366,17 +366,17 @@ Q31.1094 20.4531 19.1875 8.29688" id="BitstreamVeraSans-Roman-32"/>
<g id="xtick_3">
<g id="line2d_14">
<path clip-path="url(#p7ff5b81e1d)" d="
M225.318 388.8
L225.318 43.2" style="fill:none;stroke:#000000;stroke-dasharray:1.000000,3.000000;stroke-dashoffset:0.0;stroke-width:0.5;"/>
M229.48 388.8
L229.48 43.2" style="fill:none;stroke:#000000;stroke-dasharray:1.000000,3.000000;stroke-dashoffset:0.0;stroke-width:0.5;"/>
</g>
<g id="line2d_15">
<g>
<use style="stroke:#000000;stroke-width:0.5;" x="225.31774179" xlink:href="#m93b0483c22" y="388.8"/>
<use style="stroke:#000000;stroke-width:0.5;" x="229.479988997" xlink:href="#m93b0483c22" y="388.8"/>
</g>
</g>
<g id="line2d_16">
<g>
<use style="stroke:#000000;stroke-width:0.5;" x="225.31774179" xlink:href="#m741efc42ff" y="43.2"/>
<use style="stroke:#000000;stroke-width:0.5;" x="229.479988997" xlink:href="#m741efc42ff" y="43.2"/>
</g>
</g>
<g id="text_3">
@ -402,7 +402,7 @@ L4.89062 26.7031
z
" id="BitstreamVeraSans-Roman-34"/>
</defs>
<g transform="translate(212.69055429 401.918125)scale(0.12 -0.12)">
<g transform="translate(216.852801497 401.918125)scale(0.12 -0.12)">
<use xlink:href="#BitstreamVeraSans-Roman-30"/>
<use x="63.623046875" xlink:href="#BitstreamVeraSans-Roman-2e"/>
<use x="95.41015625" xlink:href="#BitstreamVeraSans-Roman-30"/>
@ -413,17 +413,17 @@ z
<g id="xtick_4">
<g id="line2d_17">
<path clip-path="url(#p7ff5b81e1d)" d="
M301.977 388.8
L301.977 43.2" style="fill:none;stroke:#000000;stroke-dasharray:1.000000,3.000000;stroke-dashoffset:0.0;stroke-width:0.5;"/>
M308.22 388.8
L308.22 43.2" style="fill:none;stroke:#000000;stroke-dasharray:1.000000,3.000000;stroke-dashoffset:0.0;stroke-width:0.5;"/>
</g>
<g id="line2d_18">
<g>
<use style="stroke:#000000;stroke-width:0.5;" x="301.976612685" xlink:href="#m93b0483c22" y="388.8"/>
<use style="stroke:#000000;stroke-width:0.5;" x="308.219983495" xlink:href="#m93b0483c22" y="388.8"/>
</g>
</g>
<g id="line2d_19">
<g>
<use style="stroke:#000000;stroke-width:0.5;" x="301.976612685" xlink:href="#m741efc42ff" y="43.2"/>
<use style="stroke:#000000;stroke-width:0.5;" x="308.219983495" xlink:href="#m741efc42ff" y="43.2"/>
</g>
</g>
<g id="text_4">
@ -458,7 +458,7 @@ Q23.3906 74.2188 37.2031 74.2188
Q40.9219 74.2188 44.7031 73.4844
Q48.4844 72.75 52.5938 71.2969" id="BitstreamVeraSans-Roman-36"/>
</defs>
<g transform="translate(289.390675185 401.918125)scale(0.12 -0.12)">
<g transform="translate(295.634045995 401.918125)scale(0.12 -0.12)">
<use xlink:href="#BitstreamVeraSans-Roman-30"/>
<use x="63.623046875" xlink:href="#BitstreamVeraSans-Roman-2e"/>
<use x="95.41015625" xlink:href="#BitstreamVeraSans-Roman-30"/>
@ -469,17 +469,17 @@ Q48.4844 72.75 52.5938 71.2969" id="BitstreamVeraSans-Roman-36"/>
<g id="xtick_5">
<g id="line2d_20">
<path clip-path="url(#p7ff5b81e1d)" d="
M378.635 388.8
L378.635 43.2" style="fill:none;stroke:#000000;stroke-dasharray:1.000000,3.000000;stroke-dashoffset:0.0;stroke-width:0.5;"/>
M386.96 388.8
L386.96 43.2" style="fill:none;stroke:#000000;stroke-dasharray:1.000000,3.000000;stroke-dashoffset:0.0;stroke-width:0.5;"/>
</g>
<g id="line2d_21">
<g>
<use style="stroke:#000000;stroke-width:0.5;" x="378.63548358" xlink:href="#m93b0483c22" y="388.8"/>
<use style="stroke:#000000;stroke-width:0.5;" x="386.959977994" xlink:href="#m93b0483c22" y="388.8"/>
</g>
</g>
<g id="line2d_22">
<g>
<use style="stroke:#000000;stroke-width:0.5;" x="378.63548358" xlink:href="#m741efc42ff" y="43.2"/>
<use style="stroke:#000000;stroke-width:0.5;" x="386.959977994" xlink:href="#m741efc42ff" y="43.2"/>
</g>
</g>
<g id="text_5">
@ -522,7 +522,7 @@ Q38.1406 66.4062 31.7812 66.4062
Q25.3906 66.4062 21.8438 63.2344
Q18.3125 60.0625 18.3125 54.3906" id="BitstreamVeraSans-Roman-38"/>
</defs>
<g transform="translate(366.08235858 401.918125)scale(0.12 -0.12)">
<g transform="translate(374.406852994 401.918125)scale(0.12 -0.12)">
<use xlink:href="#BitstreamVeraSans-Roman-30"/>
<use x="63.623046875" xlink:href="#BitstreamVeraSans-Roman-2e"/>
<use x="95.41015625" xlink:href="#BitstreamVeraSans-Roman-30"/>
@ -533,17 +533,17 @@ Q18.3125 60.0625 18.3125 54.3906" id="BitstreamVeraSans-Roman-38"/>
<g id="xtick_6">
<g id="line2d_23">
<path clip-path="url(#p7ff5b81e1d)" d="
M455.294 388.8
L455.294 43.2" style="fill:none;stroke:#000000;stroke-dasharray:1.000000,3.000000;stroke-dashoffset:0.0;stroke-width:0.5;"/>
M465.7 388.8
L465.7 43.2" style="fill:none;stroke:#000000;stroke-dasharray:1.000000,3.000000;stroke-dashoffset:0.0;stroke-width:0.5;"/>
</g>
<g id="line2d_24">
<g>
<use style="stroke:#000000;stroke-width:0.5;" x="455.294354475" xlink:href="#m93b0483c22" y="388.8"/>
<use style="stroke:#000000;stroke-width:0.5;" x="465.699972492" xlink:href="#m93b0483c22" y="388.8"/>
</g>
</g>
<g id="line2d_25">
<g>
<use style="stroke:#000000;stroke-width:0.5;" x="455.294354475" xlink:href="#m741efc42ff" y="43.2"/>
<use style="stroke:#000000;stroke-width:0.5;" x="465.699972492" xlink:href="#m741efc42ff" y="43.2"/>
</g>
</g>
<g id="text_6">
@ -564,7 +564,7 @@ L12.4062 0
z
" id="BitstreamVeraSans-Roman-31"/>
</defs>
<g transform="translate(442.729041975 401.918125)scale(0.12 -0.12)">
<g transform="translate(453.134659992 401.918125)scale(0.12 -0.12)">
<use xlink:href="#BitstreamVeraSans-Roman-30"/>
<use x="63.623046875" xlink:href="#BitstreamVeraSans-Roman-2e"/>
<use x="95.41015625" xlink:href="#BitstreamVeraSans-Roman-31"/>

Before

Width:  |  Height:  |  Size: 37 KiB

After

Width:  |  Height:  |  Size: 37 KiB

File diff suppressed because it is too large Load diff

Before

Width:  |  Height:  |  Size: 219 KiB

After

Width:  |  Height:  |  Size: 219 KiB

File diff suppressed because it is too large Load diff

Before

Width:  |  Height:  |  Size: 219 KiB

After

Width:  |  Height:  |  Size: 219 KiB

View file

@ -1,3 +1,3 @@
- mysql is 1.9× slower then 0.9× faster
- postgresql is 1.1× slower then 13.6× faster
- sqlite is 1.1× slower then 9.4× faster
- mysql is 2.1× slower then 0.9× faster
- postgresql is 1.1× slower then 14.2× faster
- sqlite is 1.1× slower then 8.5× faster

File diff suppressed because it is too large Load diff

Before

Width:  |  Height:  |  Size: 219 KiB

After

Width:  |  Height:  |  Size: 219 KiB

View file

@ -3,6 +3,19 @@ Benchmark
.. contents::
Introduction
............
This benchmark does not intend to be exhaustive nor fair to SQL.
It shows how django-cachalot behaves on an unoptimised application.
On an application using perfectly optimised SQL queries only,
django-cachalot may not be useful.
Unfortunately, most Django apps (including Django itself)
use unoptimised queries. Of course, they often lack useful indexes
(even though it only requires 20 characters per index…).
But what you may not know is that
**the ORM currently generates totally unoptimised queries** [#]_.
Conditions
..........
@ -70,3 +83,17 @@ Redis
~~~~~
.. image:: ../benchmark/cache_redis.svg
.. [#] The ORM fetches way too much data if you dont restrict it using
``.only`` and ``.defer``. You can divide the execution time
of most queries by 2-3 by specifying what you want to fetch.
But specifying which data we want for each query is very long
and unmaintainable. An automation using field usage statistics
is possible and would drastically improve performance.
Other performance issues occur with slicing.
You can often optimise a sliced query using a subquery, like
``YourModel.objects.filter(pk__in=YourModel.objects.filter(…)[10000:10050]).select_related(…)``
instead of ``YourModel.objects.filter(…).select_related(…)[10000:10050]``.
Ill maybe work on these issues one day.

View file

@ -1,8 +1,5 @@
What still needs to be done
---------------------------
For version 1.0
...............
- Cache raw queries
- Test multi-location caches
- Test multi-location caches if possible