-
Notifications
You must be signed in to change notification settings - Fork 4
/
index.html
1201 lines (1072 loc) · 48.9 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html lang="en" ng-app="squashBenchmark">
<head>
<meta charset="utf-8">
<title>Squash Compression Benchmark</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.5/css/bootstrap.min.css">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/bootswatch/3.3.5/sandstone/bootstrap.min.css">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/font-awesome/4.4.0/css/font-awesome.min.css">
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.5/js/bootstrap.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/angular.js/1.3.14/angular.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/d3/3.5.6/d3.js"></script>
<script src="//code.highcharts.com/highcharts.js"></script>
<style type="text/css">
.result-bar {
font-weight: bold;
color: black;
text-align: left;
text-shadow: 0px 0px 1px white;
}
.result-bar > span {
margin-left: 1em;
}
.alert a {
text-decoration: underline;
}
.bs-callout {
margin: 20px 0;
padding: 15px 30px 15px 15px;
border-left: 5px solid #eee;
}
.bs-callout h4 {
margin-top: 0;
}
.bs-callout p:last-child {
margin-bottom: 0;
}
.bs-callout code,
.bs-callout .highlight {
background-color: #fff;
}
.bs-callout-danger {
background-color: #fcf2f2;
border-color: #dFb5b4;
}
.bs-callout-warning {
background-color: #fefbed;
border-color: #f1e7bc;
}
.bs-callout-info {
background-color: #f0f7fd;
border-color: #d0e3f0;
}
.bs-callout-danger h4 {
color: #B94A48;
}
.bs-callout-warning h4 {
color: #C09853;
}
.bs-callout-info h4 {
color: #3A87AD;
}
</style>
</head>
<body ng-controller="SquashBenchmarkCtrl">
<div class="navbar navbar-default">
<div class="container">
<div class="navbar-header">
<a href="https://quixdb.github.io/squash" class="navbar-brand">Squash</a>
</div>
<div class="navbar-collapse collapse" id="navbar-main">
<ul class="nav navbar-nav">
<li class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" href="#" id="documentation-dropdow">Documentation <span class="caret"></span></a>
<ul class="dropdown-menu" aria-labelledby="documentation-dropdown">
<li><a href="https://quixdb.github.io/squash/man/squash.1.html"><code>squash</code> <abbr title="Command Line Interface">CLI</abbr></a></li>
<li class="divider"></li>
<li><a href="https://quixdb.github.io/squash/api/c/index.html">C API Reference</a></li>
<li><a href="https://quixdb.github.io/squash/api/c/md_docs_user-guide.html">C User Guide</a></li>
</ul>
</li>
<li class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" href="#" id="support-dropdown">Support <span class="caret"></span></a>
<ul class="dropdown-menu" aria-labelledby="support-dropdown">
<li><a href="https://groups.google.com/forum/#!forum/squash-compression">Mailing List</a></li>
<li><a href="irc://chat.freenode.net/squash">IRC</a></li>
<li>
<a href="https://stackoverflow.com/questions/tagged/squash-compression">Stack Overflow</a>
</li>
<li><a href="http://encode.ru/threads/2160-Squash-and-the-Squash-Benchmark">Encode.ru Thread</a></li>
<li class="divider"></li>
<li><a href="https://github.com/quixdb/squash/issues">Issue Tracker</a></li>
</ul>
</li>
<li class="active"><a href="#">Benchmark</a></li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li><a href="https://github.com/quixdb/squash"><i class="fa fa-lg fa-github"></i> GitHub</a></li>
</ul>
</div>
</div>
</div>
<div class="container">
<div class="page-header jumbotron">
<h1>Squash Compression Benchmark</h1>
<p>
The Squash library is an abstraction layer for compression
algorithms, making it trivial to switch between them… or
write a benchmark which tries them all, which is what you
see here!
</p>
<p>
The Squash Compression Benchmark currently consists of
{{datasets.length|number}} datasets, each of which is tested
against {{plugins.length}} plugins containing
{{codecs.length|number}} codecs at every compression level
they offer—the number varies by codec, but there are
{{data_points_per_machine|number}} in total, yielding
{{data_points_per_machine*datasets.length|number}} different
settings. The benchmark is currently run on
{{machines.length|number}} different machines for a current
grand total of
{{datasets.length*machines.length*data_points_per_machine|number}}
configurations, and growing.
</p>
<p>
<a href="#results" class="btn btn-primary btn-lg">Skip to results (pretty pictures!)</a>
<a href="https://quixdb.github.com/squash" class="btn btn-default btn-lg" target="_new">Learn more about Squash <i class="fa fa-external-link"></i></a>
</p>
</div>
<div class="alert alert-danger" role="alert" ng-show="false">
<h2 style="margin-top: 0">Javascript Required</h2>
<p>
Javascript is required for this to work, and it looks like
you don't have it enabled. Sorry; you can
still <a href="#faq-raw-data">download the CSV data</a>, but
the charts and tables on this page will not work unless you
enable Javascript.
</p>
</div>
<!-- <div class="alert alert-info" role="alert"> -->
<!-- <h2 style="margin-top: 0">Help Wanted</h2> -->
<!-- <p> -->
<!-- There are a lot -->
<!-- of <a href="https://github.com/quixdb/squash-benchmark/labels/web-site">cool -->
<!-- things</a> someone with some interest in data visualizations -->
<!-- and/or JavaScript could do -->
<!-- with <a href="https://github.com/quixdb/squash-benchmark-web/tree/master/data">this -->
<!-- data</a>, and that person isn't me! I like dealing with the -->
<!-- Squash library and the C side of things, but design and -->
<!-- JavaScript just isn't fun for me. -->
<!-- </p> -->
<!-- <p> -->
<!-- If you're interested in helping out (or taking over), I'd -->
<!-- love -->
<!-- to <a href="https://github.com/quixdb/squash-benchmark/labels/web-site">hear -->
<!-- from you</a>. <abbr title="For What It's Worth">FWIW</abbr> -->
<!-- I'm not attached to the current code or libraries; feel free -->
<!-- to throw it out and start over if you think that's best. -->
<!-- </p> -->
<!-- </div> -->
<div id="configuration">
<h1>Configuration <a href="#configuration"><i class="fa fa-link"></i></a></h1>
<form>
<h2 id="choose-a-dataset">Choose a dataset <a href="#choose-a-dataset"><i class="fa fa-link"></i></a></h2>
<p>
Different codecs can behave <em>very</em> differently with
different data. Some are great at compressing text but
horrible with binary data, some excel with more repetitive
data like logs. Many have long initialization times but are
fast once they get started, while others can
compress/decompress small buffers almost instantly.
</p>
<p>
This benchmark is run against many standard datasets.
Hopefully one of them is interesting for you, but if not
don't worry—you can use Squash to easily run your own
benchmark with whatever data you want. That said, if you
think you have a somewhat common use case,
please <a href="https://github.com/nemequ/squash-corpus/issues">let
us know</a>—we may be interested in adding the data to
this benchmark.
</p>
<div ng-if="random_dataset" class="bs-callout bs-callout-info">
<h4>Note</h4>
<p>
The default dataset is selected randomly.
</p>
</div>
<div class="table-responsive">
<table class="table table-striped">
<thead>
<tr>
<th></th>
<th ng-click="datasetSortReverse = (datasetSort == 'id') ? !datasetSortReverse : false; datasetSort = 'id'">
Name
<i ng-if="datasetSort == 'id'" class="fa" ng-class="datasetSortReverse ? 'fa-sort-desc' : 'fa-sort-asc'"></i>
</th>
<th ng-click="datasetSortReverse = (datasetSort == 'source') ? !datasetSortReverse : false; datasetSort = 'source'">
Source
<i ng-if="datasetSort == 'source'" class="fa" ng-class="datasetSortReverse ? 'fa-sort-desc' : 'fa-sort-asc'"></i>
</th>
<th ng-click="datasetSortReverse = (datasetSort == 'description') ? !datasetSortReverse : false; datasetSort = 'description'">
Description
<i ng-if="datasetSort == 'description'" class="fa" ng-class="datasetSortReverse ? 'fa-sort-desc' : 'fa-sort-asc'"></i>
</th>
<th ng-click="datasetSortReverse = (datasetSort == 'size') ? !datasetSortReverse : false; datasetSort = 'size'">
Size
<i ng-if="datasetSort == 'size'" class="fa" ng-class="datasetSortReverse ? 'fa-sort-desc' : 'fa-sort-asc'"></i>
</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="corpus in datasets | orderBy:datasetSort:datasetSortReverse">
<td>
<input type="radio" name="corpus" ng-value="corpus.id" ng-model="$parent.dataset" id="dataset-{{corpus.id}}">
</td>
<td>
<label for="dataset-{{corpus.id}}" ng-bind="corpus.id"></label>
</td>
<td><a ng-href="{{corpus.sourceUrl}}" ng-bind="corpus.source"></a></td>
<td ng-bind="corpus.description"></td>
<td ng-bind="corpus.size | formatSize">}</td>
</tr>
</tbody>
</table>
</div>
</form>
<div>
<h2 id="choose-a-machine">Choose a machine <a href="#choose-a-machine"><i class="fa fa-link"></i></a></h2>
<p>
If you think certain algorithms are always faster, you've
got another thing coming! Different
<abbr title="Central Processing Unit">CPU</abbr>s
can behave very differently
with the same data.
</p>
<p>
The Squash benchmark is currently run on many of the
machines I have access to—this happens to be fairly recent
Intel <abbr>CPU</abbr>s, and a mix of
ARM <abbr title="Single Board Computer">SBC</abbr>s.
There
is <a href="#faq-additional-machine">an entry in the
<abbr title="Frequently Asked Questions">FAQ</abbr></a>
with more details.
</p>
<div ng-if="random_machine" class="bs-callout bs-callout-info">
<h4>Note</h4>
<p>
The default machine is selected randomly.
</p>
</div>
<div class="table-responsive">
<table class="table table-condensed table-striped">
<thead>
<tr>
<th></th>
<th ng-click="machineSortReverse = (machineSort == 'name') ? !machineSortReverse : false; machineSort = 'name'">
Name
<i ng-if="machineSort == 'name'" class="fa" ng-class="machineSortReverse ? 'fa-sort-desc' : 'fa-sort-asc'"></i>
</th>
<th>Status</th>
<th ng-click="machineSortReverse = (machineSort == 'cpu') ? !machineSortReverse : false; machineSort = 'cpu'">
<abbr title="Central Processing Unit">CPU</abbr>/<abbr title="System On a Chip">SoC</abbr>
<i ng-if="machineSort == 'cpu'" class="fa" ng-class="machineSortReverse ? 'fa-sort-desc' : 'fa-sort-asc'"></i>
</th>
<th ng-click="machineSortReverse = (machineSort == 'architecture') ? !machineSortReverse : false; machineSort = 'architecture'">
Architecture
<i ng-if="machineSort == 'architecture'" class="fa" ng-class="machineSortReverse ? 'fa-sort-desc' : 'fa-sort-asc'"></i>
</th>
<th ng-click="machineSortReverse = (machineSort == 'speed') ? !machineSortReverse : false; machineSort = 'speed'">
Clock Speed
<i ng-if="machineSort == 'speed'" class="fa" ng-class="machineSortReverse ? 'fa-sort-desc' : 'fa-sort-asc'"></i>
</th>
<th ng-click="machineSortReverse = (machineSort == 'memory') ? !machineSortReverse : false; machineSort = 'memory'">
Memory
<i ng-if="machineSort == 'memory'" class="fa" ng-class="machineSortReverse ? 'fa-sort-desc' : 'fa-sort-asc'"></i>
</th>
<th ng-click="machineSortReverse = (machineSort == 'platform') ? !machineSortReverse : false; machineSort = 'platform'">
Platform
<i ng-if="machineSort == 'platform'" class="fa" ng-class="machineSortReverse ? 'fa-sort-desc' : 'fa-sort-asc'"></i>
</th>
<th ng-click="machineSortReverse = (machineSort == 'distro') ? !machineSortReverse : false; machineSort = 'distro'">
Distro
<i ng-if="machineSort == 'distro'" class="fa" ng-class="machineSortReverse ? 'fa-sort-desc' : 'fa-sort-asc'"></i>
</th>
<th ng-click="machineSortReverse = (machineSort == 'kernel') ? !machineSortReverse : false; machineSort = 'kernel'">
Kernel
<i ng-if="machineSort == 'kernel'" class="fa" ng-class="machineSortReverse ? 'fa-sort-desc' : 'fa-sort-asc'"></i>
</th>
<th ng-click="machineSortReverse = (machineSort == 'compiler') ? !machineSortReverse : false; machineSort = 'compiler'">
Compiler
<i ng-if="machineSort == 'compiler'" class="fa" ng-class="machineSortReverse ? 'fa-sort-desc' : 'fa-sort-asc'"></i>
</th>
<th><abbr title="Comma-Separated Values">CSV</abbr></th>
</tr>
</thead>
<tbody>
<tr ng-repeat="system in machines | orderBy:machineSort:machineSortReverse">
<td><input type="radio" name="system" id="dataset-{{system.name}}" value="{{system.name}}" ng-model="$parent.machine"></td>
<td><label for="dataset-{{system.name}}" ng-bind="system.name"></label></td>
<td style="text-align: center" ng-switch="system.failures">
<i ng-switch-when="undefined" class="fa fa-check"></i>
<span ng-switch-default class="failure-popover" tabindex="0" role="button" data-toggle="popover" data-trigger="focus" title="Failures" data-failures="{{system.failures}}">
<i class="fa fa-exclamation"></i>
</span>
</td>
<td><a ng-href="{{ system.cpuUrl }}" ng-bind="system.cpu"></a></td>
<td ng-bind="system.architecture"></td>
<td ng-bind="system.speed | formatFrequency"></td>
<td ng-bind="system.memory * 1024 * 1024 | formatSize"></td>
<td><a href="{{ system.platformUrl }}" ng-bind="system.platform"></a></td>
<td ng-bind="system.distro"></td>
<td ng-bind="system.kernel"></td>
<td ng-bind="system.compiler"></td>
<td style="text-align: center"><a href="data/{{ system.name }}.csv"><i class="fa fa-table"></i></a></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div id="results">
<h2>Results <a href="#results"><i class="fa fa-link"></i></a></h2>
<ol>
<li><a href="#ratio-vs-compression">Compression Ratio vs. Compression Speed</a></li>
<li><a href="#ratio-vs-decompression">Compression Ratio vs. Decompression Speed</a></li>
<li><a href="#compression-vs-decompression">Compression Speed vs. Decompression Speed</a></li>
<li><a href="#round-trip-vs-ratio">Round-Trip vs. Compression Ratio</a></li>
<li><a href="#transfer-plus-processing">Transfer + Processing</a></li>
<li><a href="#optimal-codecs">Optimal Codecs</a></li>
<li><a href="#results-table">Results Table</a></li>
</ol>
<p>
Note that we do provide <a href="#faq-raw-data">access to
the raw data</a> if you would prefer to generate your own
charts.
</p>
<div id="ratio-vs-compression" class="panel panel-primary">
<div class="panel-heading">
<h3 class="panel-title">Compression Ratio vs. Compression Speed <a href="#ratio-vs-compression"><i class="fa fa-link"></i></a></h3>
</div>
<div class="embed-responsive embed-responsive-16by9">
<div id="ratio-compression-chart" class="embed-responsive-item panel-body"></div>
</div>
</div>
<div id="ratio-vs-decompression" class="panel panel-primary">
<div class="panel-heading">
<h3 class="panel-title">Compression Ratio vs. Decompression Speed <a href="#ratio-vs-decompression"><i class="fa fa-link"></i></a></h3>
</div>
<div class="embed-responsive embed-responsive-16by9">
<div id="ratio-decompression-chart" class="embed-responsive-item panel-body"></div>
</div>
</div>
<div id="compression-vs-decompression" class="panel panel-primary">
<div class="panel-heading">
<h3 class="panel-title">Compression Speed vs. Decompression Speed <a href="#compression-vs-decompression"><i class="fa fa-link"></i></a></h3>
</div>
<div class="embed-responsive embed-responsive-16by9">
<div id="compression-decompression-chart" class="embed-responsive-item panel-body"></div>
</div>
</div>
<div id="round-trip-vs-ratio" class="panel panel-primary">
<div class="panel-heading">
<h3 class="panel-title">Round Trip Speed vs. Compression Ratio <a href="#round-trip-vs-ratio"><i class="fa fa-link"></i></a></h3>
</div>
<div class="embed-responsive embed-responsive-16by9">
<div id="rtt-ratio-chart" class="embed-responsive-item panel-body"></div>
</div>
</div>
<div id="transfer-plus-processing" class="panel panel-primary">
<div class="panel-heading">
<h3 class="panel-title">Transfer + Processing <a href="#transfer-plus-processing"><i class="fa fa-link"></i></a></h3>
</div>
<div>
<div class="panel-body">
<p>
Sometimes all you care about is how long something
takes to load or save, and how much disk space or
bandwidth is used doesn't really matter. For example,
if you have a file that would take 1 second to load if
uncompressed and you could cut the file size in half
by compressing it, as long as decompressing takes less
than half a second the content is available sooner
than it would have been without compression.
</p>
<div class="bs-callout bs-callout-info">
<h4>Note</h4>
<p>
For the presets I have tried to provide typical
real-world speeds, not theoretical peaks. This can
be significantly less than the advertised speed.
</p>
<p>
When entering custom values please keep in mind that
this uses <em>bytes</em> per second, not bits per
second. Also, it
uses <a href="https://en.wikipedia.org/wiki/Binary_prefix">binary
prefixes</a> (1 MiB is 1024 KiB, not 1000).
</p>
</div>
<form class="form-horizontal">
<div class="form-group">
<label for="transferSpeed" class="col-sm-2 control-label">Transfer Speed</label>
<div class="input-group col-sm-4">
<div class="input-group-btn">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Presets <span class="caret"></span></button>
<ul class="dropdown-menu dropdown-menu-right">
<li><a href="" ng-click="transferSpeed = 850; transferSpeedUnits = 'KiB/s'">4G Wireless</a></li>
<li><a href="" ng-click="transferSpeed = 6; transferSpeedUnits = 'MiB/s'">802.11g</a></li>
<li><a href="" ng-click="transferSpeed = 7.5; transferSpeedUnits = 'MiB/s'">Cable Internet</a></li>
<li><a href="" ng-click="transferSpeed = 75; transferSpeedUnits = 'MiB/s'">7200 RPM HDD</a></li>
<li><a href="" ng-click="transferSpeed = 500; transferSpeedUnits = 'MiB/s'">SSD</a></li>
</ul>
</div>
<input class="form-control" ng-model="transferSpeed" id="transferSpeed">
<div class="input-group-btn">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><span ng-bind="transferSpeedUnits"></span> <span class="caret"></span></button>
<ul class="dropdown-menu dropdown-menu-right">
<li><a href="" ng-click="transferSpeedUnits = 'KiB/s'">KiB/s</a></li>
<li><a href="" ng-click="transferSpeedUnits = 'MiB/s'">MiB/s</a></li>
<li><a href="" ng-click="transferSpeedUnits = 'GiB/s'">GiB/s</a></li>
</ul>
</div>
</div>
</div>
<div class="form-group">
<label for="visibleItems" class="col-sm-2 control-label">Visible Items</label>
<div class="input-group col-sm-4">
<select id="visibleItems" class="form-control" ng-model="transferProcessVisible">
<option value="50">More than 50% faster than no compression</option>
<option value="75">More than 25% faster than no compression</option>
<option value="90">More than 10% faster than no compression</option>
<option value="100">Faster than no compression</option>
<option value="110">Within 10% of no compression</option>
<option value="125">Within 25% of no compression</option>
<option value="150">Within 50% of no compression</option>
<option value="0">All</option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">Sort</label>
<div class="input-group col-sm-4">
<label class="radio-inline">
<input type="radio" name="transferProcessSort" value="time" ng-model="transferProcessSort"> Total time
</label>
<label class="radio-inline">
<input type="radio" name="transferProcessSort" value="name" ng-model="transferProcessSort"> Name
</label>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">Direction</label>
<div class="input-group col-sm-4">
<label class="radio-inline">
<input type="radio" name="transferProcessDirection" value="decompress" ng-model="transferProcessDirection"> Decompression
</label>
<label class="radio-inline">
<input type="radio" name="transferProcessDirection" value="compress" ng-model="transferProcessDirection"> Compression
</label>
<label class="radio-inline">
<input type="radio" name="transferProcessDirection" value="both" ng-model="transferProcessDirection"> Both
</label>
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<button type="submit" class="btn btn-primary" ng-click="drawTransferDecompressionChart()">Draw</button>
</div>
</div>
</form>
<div id="transfer-decompression-chart"></div>
</div>
</div>
</div>
<div id="optimal-codecs" class="panel panel-primary">
<div class="panel-heading">
<h3 class="panel-title">Optimal Codecs <a href="#optimal-codecs"><i class="fa fa-link"></i></a></h3>
</div>
<div class="embed-responsive embed-responsive-16by9">
<div id="optimal-codec-chart" class="embed-responsive-item panel-body"></div>
</div>
</div>
<div id="results-table" class="panel panel-primary">
<div class="panel-heading">
<div>
<!-- <div class="dropdown" style="float: right"> -->
<!-- <div id="dLabel" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> -->
<!-- <i class="fa fa-cog fa-2x"></i> -->
<!-- </div> -->
<!-- <ul class="dropdown-menu dropdown-menu-right" role="menu" aria-labelledby="dLabel"> -->
<!-- <li><a href="#">Compression Speed <i class="fa fa-check"></i></a></li> -->
<!-- <li><a href="#">Decompression Speed <i class="fa fa-check"></i></a></li> -->
<!-- <li><a href="#">Compression Ratio <i class="fa fa-check"></i></a></li> -->
<!-- </ul> -->
<!-- </div> -->
<h3 class="panel-title">Results <a href="#results-table"><i class="fa fa-link"></i></a></h3>
</div>
</div>
<div class="table-responsive">
<table class="table table-condensed table-striped">
<thead>
<tr>
<!-- <th>Show</th> -->
<th ng-click="rawSortReverse = (rawSort == 'plugin') ? !rawSortReverse : false; rawSort = 'plugin'">
Plugin
<i ng-if="rawSort == 'plugin'" class="fa" ng-class="rawSortReverse ? 'fa-sort-desc' : 'fa-sort-asc'"></i>
</th>
<th ng-click="rawSortReverse = (rawSort == 'codec') ? !rawSortReverse : false; rawSort = 'codec'">
Codec
<i ng-if="rawSort == 'codec'" class="fa" ng-class="rawSortReverse ? 'fa-sort-desc' : 'fa-sort-asc'"></i>
</th>
<th ng-click="rawSortReverse = (rawSort == 'level') ? !rawSortReverse : false; rawSort = 'level'">
Level
<i ng-if="rawSort == 'level'" class="fa" ng-class="rawSortReverse ? 'fa-sort-desc' : 'fa-sort-asc'"></i>
</th>
<th ng-click="rawSortReverse = (rawSort == 'compressed_size') ? !rawSortReverse : false; rawSort = 'compressed_size'">
Compression Ratio
<i ng-if="rawSort == 'compressed_size'" class="fa" ng-class="rawSortReverse ? 'fa-sort-desc' : 'fa-sort-asc'"></i>
</th>
<th ng-click="rawSortReverse = (rawSort == 'compress_cpu') ? !rawSortReverse : false; rawSort = 'compress_cpu'">
Compression Speed
<i ng-if="rawSort == 'compress_cpu'" class="fa" ng-class="rawSortReverse ? 'fa-sort-desc' : 'fa-sort-asc'"></i>
</th>
<th ng-click="rawSortReverse = (rawSort == 'decompress_cpu') ? !rawSortReverse : false; rawSort = 'decompress_cpu'">
Decompression Speed
<i ng-if="rawSort == 'decompress_cpu'" class="fa" ng-class="rawSortReverse ? 'fa-sort-desc' : 'fa-sort-asc'"></i>
</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="result in data | orderBy:rawSort:rawSortReverse">
<td class="nowrap-xs" style="width: 1px; vertical-align: middle; white-space: nowrap" ng-bind="result.plugin"></td>
<td class="nowrap-xs" style="width: 1px; vertical-align: middle; white-space: nowrap" ng-bind="result.codec"></td>
<td class="nowrap-xs" style="width: 1px; vertical-align: middle; white-space: nowrap" ng-bind="result.level"></td>
<td ng-switch on="result.plugin">
<div ng-switch-when="copy">
{{ result.ratio | number:2 }}
</div>
<div ng-switch-default class="progress" style="margin-bottom: 0">
<div class="progress-bar progress-bar-warning result-bar"
style="white-space: nowrap; width: {{ ((result.ratio - 1) / (bestRatio - 1)) * 100 }}%">
<span>{{ result.ratio | number:2 }}</span>
</div>
</div>
</td>
<td ng-switch on="result.plugin">
<div ng-switch-when="copy">
{{ result.compression_rate | formatSpeed }}
</div>
<div ng-switch-default class="progress" class="progress" style="margin-bottom: 0">
<div class="progress-bar progress-bar-info result-bar"
style="white-space: nowrap; width: {{ (result.compression_rate / bestCompressionRate) * 100 }}%">
<span>{{ result.compression_rate | formatSpeed }}</span>
</div>
</div>
</td>
<td ng-switch on="result.plugin">
<div ng-switch-when="copy">
{{ result.decompression_rate | formatSpeed }}
</div>
<div ng-switch-default class="progress" class="progress" style="margin-bottom: 0">
<div class="progress-bar progress-bar-success result-bar"
style="white-space: nowrap; width: {{ (result.decompression_rate / bestDecompressionRate) * 100 }}%">
<span>{{ result.decompression_rate | formatSpeed }}</span>
</div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
<div id="faq" class="container">
<h1>Codec Details <a href="#codec-details"><i class="fa fa-link"></i></a></h1>
<div class="table-responsive">
<table class="table table-condensed table-striped">
<thead>
<tr>
<th>Library Name</th>
<th>Version</th>
<th>License</th>
<th>Plugin</th>
<th>Codec</th>
<th>Streaming</th>
<th>Flushing</th>
<th>Levels</th>
</tr>
</thead>
<tbody ng-repeat="plugin in plugins">
<tr ng-repeat="codec in plugin.codecs">
<td ng-if="$first" rowspan="{{plugin.codecs.length}}">
<a ng-if="plugin.libraryUrl != undefined" ng-href="{{plugin.libraryUrl}}" target="_new">
<span ng-bind="plugin.name"></span>
<i class="fa fa-external-link"></i>
</a>
</td>
<td ng-if="$first" rowspan="{{plugin.codecs.length}}">
<span ng-if="plugin.version" ng-bind="plugin.version"></span>
<span ng-if="plugin.revision" ng-bind="plugin.revision.slice(0,8)"></span>
</td>
<td ng-if="$first" rowspan="{{plugin.codecs.length}}" ng-bind="plugin.license"></td>
<td ng-if="$first" rowspan="{{plugin.codecs.length}}">
<a ng-href="https://quixdb.github.io/squash/api/c/md_plugins_{{plugin.id}}_{{plugin.id}}.html">
<span ng-bind="plugin.id"></span>
<i class="fa fa-external-link"></i>
</a>
</td>
<td ng-bind="codec.name"></td>
<td style="text-align: center">
<span ng-if="codec.streaming">✓</span>
</td>
<td style="text-align: center">
<span ng-if="codec.flushing">✓</span>
</td>
<td ng-bind="codec.levels.join(', ')"></td>
</tr>
</tbody>
</table>
</div>
</div>
<div id="faq" class="container">
<h1>FAQ <a href="#faq"><i class="fa fa-link"></i></a></h1>
<p>
Well, okay, I'm writing this before I publish the URL, so not
so much "frequently asked questions" as "things
I thought you might be wondering", but if I called this
section "TITYMBW" the first thing I would have to
answer would be "WTF is 'TITYMBW'?"
</p>
<dl>
<dt id="faq-announce-list">Can I be informed of updates? <a href="#faq-announce-list"><i class="fa fa-link"></i></a></dt>
<dd>
<p>
Sure! This benchmark is updated whenever a new version of
Squash is released, so you can
just <a href="https://quixdb.github.io/squash/#announce-list">subscribe
to the squash-annonce mailing list</a>. We send one
message to announce the updated version of both the
library and the benchmark.
</p>
</dd>
<dt id="faq-additional-codecs">Will you add <var>«insert compression codec»</var>? <a href="#fal-additional-codecs"><i class="fa fa-link"></i></a></dt>
<dd>
<p>
In order to be included the benchmark the software must be
supported
by <a href="https://quixdb.github.io/squash/">Squash</a>.
If there is a specific codec you're interested in,
please <a href="https://github.com/quixdb/squash/issues">file
an issue against Squash</a>.
</p>
<p>
If the codec is reliable (it has to pass Squash's unit
tests), works on Linux, accessible from C or C++, and open
source the odds are good I would be willing to write a
plugin, or at least merge a pull request.
</p>
<p>
If the codec doesn't meet <em>all</em> the above critera I
still <em>may</em> be willing to accept a pull request for
a plugin, but keep in mind that all the machines I run
this on are running Linux with various architectures, so
even if there is a plugin for a Windows-only, or x86-only,
etc., library it probably will not show up for every
machine. For example, I would like
to <a href="https://github.com/quixdb/squash/issues/54">add
a Windows API plugin</a>, but it will not show up on any
of the Linux machines' results. Ditto
for <a href="https://developer.apple.com/library/prerelease/ios/documentation/Performance/Reference/Compression/index.html">OS
X</a>.
</p>
</dd>
<dt id="faq-proprietary-codecs">Will you include proprietary codecs? <a href="#faq-proprietary-codecs"><i class="fa fa-link"></i></a></dt>
<dd>
<p>
I am trying to make Squash as friendly as I can towards
proprietary compression codecs, but the fact is that they
significantly complicate things on technical grounds.
First, they are usually executables, not libraries. That
means that in order for a plugin to work it would have to
do the whole <code>fork()</code>/<code>exec()</code> thing
and use <abbr title="Inter-Process
Communication">IPC</abbr> to communicate. That is going to
put them at a significant performance disadvantage,
especially for small files.
</p>
<p>
All the machines in the benchmark are running Linux. That
means that, with the current set of machines, in order to
be included in the benchmark the codec needs to have a
Linux version. Also, not all the machines are x86/x86_64…
How often do you see closed source compressors for Linux
on ARM? Not every codec needs to work on every platform,
but you should keep in mind that, without the source code,
it is unlikely every codec will work on every platform the
benchmark is run on, so there would likely be gaps in the
data.
</p>
<p>
It is also worth mentioning that the people behind the
Squash project have no plans to write any plugins for
proprietary libraries themselves. We would be willing to
include them in the benchmark, and even to help test and
maintain open-source plugins for them, but don't wait for
us to write a plugin for a proprietary library.
</p>
</dd>
<dt id="faq-calculation">How are the values calculated? <a href="#faq-calculation"><i class="fa fa-link"></i></a></dt>
<dd>
<p>
The benchmark collects the compressed size, compression
time, and decompression time. Those are then used to
calculate the values used in the benchmark:
</p>
<dl class="dl-horizontal" style="margin-left: 2em">
<dt>Ratio</dt>
<dd><p><var>uncompressed size<var> ÷ <var>compressed size</var></p></dd>
<dt>Compression Speed</dt>
<dd><p><var>uncompressed size<var> ÷ <var>compression time</var></p></dd>
<dt>Decompression Speed</dt>
<dd><p><var>uncompressed size<var> ÷ <var>decompression time</var></p></dd>
<dt>Round Trip Speed</dt>
<dd><p>(2 × <var>uncompressed size<var>) ÷ (<var>compression time</var> + <var>decompression time</var>)</p></dd>
</dl>
<p>
Sizes are presented
using <a href="https://en.wikipedia.org/wiki/Binary_prefix">binary
prefixes</a>—1 KiB is 1024 bytes, 1 MiB is 1024 KiB, and so on.
</p>
</dd>
<dt id="faq-memory-usage">What about memory usage? <a href="#faq-memory-usage"><i class="fa fa-link"></i></a></dt>
<dd>
<p>
I would really like to include that data. If you have a
good way to capture that data on the C side
(in <a href="https://github.com/quixdb/squash-benchmark/blob/master/benchmark.c">benchmark.c</a>)
I would be very happy to merge it, and integrate it into
the results.
</p>
<p>
Please
use <a href="https://github.com/quixdb/squash-benchmark/issues/2">quixdb/squash-benchmark#2</a>
to discuss this.
</p>
</dd>
<dt id="faq-wall-clock-or-cpu">Is time CPU time or wall-clock? <a href="#faq-wall-clock-or-cpu"><i class="fa fa-link"></i></a></dt>
<dd>
<p>
CPU time. Wall-clock data is actually captured but not
presented. I'm willing to consider pull requests if you
can find a good way to display it, as well as a good
reason.
</p>
</dd>
<dt id="faq-multi-threading">What about multi-threading? <a href="#faq-multi-threading"><i class="fa fa-link"></i></a></dt>
<dd>
<p>
That's a tricky question. For one thing it would explode
the number of data points (for example, LZMA would have 4
codecs with 9 levels each, multiplied the number the
number of cores—that's 288 different configurations on an
8-core machine per dataset). Obviously this would make
generating the benchmark even slower, but the main problem
is presenting the data in a way which doesn't destroy the
usability for people who are interested in single-threaded
compression/decompression.
</p>
</dd>
<dt id="faq-logarithmic">Can you switch the graphs to use a logarithmic scale? <a href="#faq-logarithmic"><i class="fa fa-link"></i></a></dt>
<dd>
<p>
<em>You</em> can. Just click on the label for either axis
and it will toggle between linear and logarithmic. I know
this isn't obvious—I'd be happy to merge
a <abbr title="Pull Request">PR</abbr> if you can improve
that.
</p>
<p>
I don't want to switch the default because I think that
linear is probably better for most people. Logarithmic
tends to be better if all you care about is compression
ratio, not speed.
</p>
</dd>
<dt id="faq-compare-machines">Can you make it easier to compare machines or datasets (instead of codecs)? <a href="#faq-compare-machines"><i class="fa fa-link"></i></a></dt>
<dd>
<p>
I would like to (see
<a href="https://github.com/quixdb/squash-benchmark-web/issues/2">quixdb/squash-benchmark-web#2</a>
and <a href="https://github.com/quixdb/squash-benchmark-web/issues/3">quixdb/squash-benchmark-web#3</a>
for discussion). It is probably going to require
downloading all the data from all the machines, which is
around
{{data_points_per_machine*datasets.length*machines.length*66|formatSize:-1}},
though HTTP compression should help (oh, the irony of
being stuck with zlib).
</p>
</dd>
<dt id="faq-additional-features">Can you add a feature (chart, table, <i>etc.</i>) to the bencmark? <a href="#faq-additional-features"><i class="fa fa-link"></i></a></dt>
<dd>
<p>
No promises, but I am looking for ideas—I'm certainly
willing to at least listen to the request.
Please <a href="https://github.com/quixdb/squash-benchmark-web/issues">file
an issue</a>.
</p>
</dd>
<dt id="faq-library-performance">My library isn't performing as well as I think it should! <a href="#faq-library-performance"><i class="fa fa-link"></i></a></dt>
<dd>
<p>
Sorry. I am trying to keep conditions as fair and as
close to real-world as I can, but I'm certainly willing to
discuss any concerns you have with methodology.
</p>
<p>
The Squash library typically adds very little overhead,
but if you have ideas on how to improve the plugin for
your library I'm happy to accept patches.
</p>
<p>
If the issue is performance on an architecture you don't
have access to (e.g., ARM), I'm willing to provide SSH
access to most of the machines included in this benchmark
to people working on open source libraries. If you would
like access to one to help you optimize your code just let
me know.
</p>
</dd>
<dt id="faq-additional-machine">Can you add <var>«insert machine, CPU, architecture, <abbr title="Operating System">OS</abbr>, etc.»</var>? <a href="#faq-additional-machine"><i class="fa fa-link"></i></a></dt>
<dd>
<p>
Only if I have, or at least have access to, a machine
which fits that description.
</p>
<p>
In general I include what I have available. That tends to
be some newish Intel CPUs, some older Intel CPUs that
haven't yet found their way to the electronics recycler,
and some ARM SBCs. If you would like to donate other
hardware I'm willing to add it to the benchmark.
</p>
</dd>
<dt id="faq-compiler-flags">What compiler flags were used? <a href="#faq-compiler-flags"><i class="fa fa-link"></i></a></dt>
<dd>
<p>
Flags vary a bit since different plugins require different
flags, but as far as performance related flags are
concerned, plugins are currently compiled with <code>-O3
-flto -march=native -mtune=native</code>.
</p>
<p>
If you are the author of one of the libraries and would
like for your plugin to use different flags when compiled
as part of Squash,
please <a href="https://github.com/quixdb/squash-benchmark/issues">file
an issue</a>. As long as the flags are safe, we will
respect your wishes.
</p>
</dd>
<dt id="faq-run-time">How long does it take to run the benchmark? <a href="#faq-run-time"><i class="fa fa-link"></i></a></dt>
<dd>
<p>
For each level of each codec, the benchmark will compress
the data repeatedly until 5 seconds has elapsed, then do
the same for decompression. Therefore, each level
executes for a <em>minimum</em> of 10 seconds. There are
{{data_points_per_machine|number}} levels and
{{datasets.length|number}} datasets, for a total of
{{(data_points_per_machine*datasets.length*10)|formatDuration}}
minumum, per machine.
</p>
<p>
That said, for larger datasets not all codecs will be able
to complete even one iteration in 5 seconds. Some take
<em>much</em> longer; compressing enwik8 with LZMA at
level 9 on the BeagleBoard-xM, for example, takes almost
11 hours per codec (there are four: lzma, lzma1, lzma2,
and xz) in wall-clock time (largely due to thrashing—CPU
time is more than an order of magnitude less).
</p>
<p>
In practice, the fastest machine (peltast) currently takes
about 22 hours, the slowest (beagleboard-xm) just shy of 7
days.
</p>
</dd>
<dt id="faq-additional-build-configurations">Will you add different sets of compiler flags? <a href="#faq-additional-build-configurations"><i class="fa fa-link"></i></a></dt>
<dd>
<p>
No. There are a huge number of different possible
options, which can be combined in a any way, leading to a
combinatorial explosion of the number of times the
benchmark would have to be run. Given
the <a href="#faq-run-time">time it takes to run the
benchmark</a>, this is simply not feasible.