-
Notifications
You must be signed in to change notification settings - Fork 0
/
times.txt
699 lines (616 loc) · 35.4 KB
/
times.txt
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
##-- reference: kern01
nfiles = 15947 ~ 16k # wc -l kern01/kern01.con
ntoks = 32002213 ~ 32M # echo `du -b kern/index/kern01/kern01._storage_Token | cut -f1`/4 | bc
size(ddc_index) = 1.3G # du -h kern/index/kern01 # = 1264 MB = 1293632 KB = 1323040793 B
size(xml_txt) = 324M # ssh kira du -hs dstar/corpora/kern/build/xml_txt
size(xml_ddc) = 5.2G # ssh kira du -hs dstar/corpora/kern/build/ddc_xml
size(ddc_tabs) = 707M
: size(ddc_index) ~ 41 bytes/tok
##-- reference: kern01-1k
nfiles = 1000 ~ 1k # wc -l kern01-1k.files
ntoks = 2277906 ~ 2.27M # (while read f ; do tt-words.sh $f ; done < kern01-1k.files) | wc -l
size(ddc_index) ~ 90M # echo "$ntoks_kern01_1k/$ntoks_kern01 * $ddcsize_kern01" | bc -l # 94173567 B = 91966 kb = 89.8M
size(xml_txt) ~ 23M # echo "$ntoks_kern01_1k/$ntoks_kern01 * $size_xml_txt_kern01" | bc -l
size(xml_ddc) ~ 370M # echo "$ntoks_kern01_1k/$ntoks_kern01 * $size_xml_ddc_kern01" | bc -l
: size(ddc_index) ~ 41 bytes/tok
##-- reference: corpus1
nfiles = 6 # wc -l corpus1.dump-ddc-tabs.files
ntoks = 323559 ~ 324k # (while read f ; do tt-words.sh $f ; done < corpus1.dump-ddc-tabs.files) | wc -l
size(ddc_index) ~ 32M # du -hsc ../corpus1._* # = 32208 kb = 32554373 B
size(xml_txt) ~ ? #
size(xml_ddc) ~ 28M # (cd ..; du -msc `cat corpus1.con`)
: size(ddc_index) ~ 100 bytes/tok
##-- ngdb-NN
$ time ./ti-ngrams2db.perl -pk='N*' -pv='N' kern01.ti.ng5 -o=kern01.ti.ng5.db-NN
real 3m5.363s
user 3m1.855s
sys 0m1.976s
: db size[5] = 1112068096 = 1.1G
$ time ./ti-ngramdb-apply.perl -pk='N*' -pv='N' kern01.ti.ng5.db-NN test-100k.i5 -o=/dev/null
real 0m1.265s
user 0m1.052s
sys 0m0.208s
: lookup = 79051 op/sec ~ 79k op/sec ~ 12.65 usec/op
##-- ngdb-NN : project
$ for N in 4 3 2 1 ; do let n="$N+1"; echo "n=$n --> N=$N"; time ./ti-ngramdb-project.perl -N=$N kern01.ti.ng${n}.db-NN -o=kern01.ti.ng${N}.db-NN ; done
n=5 --> N=4
real 2m56.310s
user 2m17.309s
sys 0m2.612s
: db size[4] ~ 874418176 ~ 835M
n=4 --> N=3
real 2m27.425s
user 1m53.415s
sys 0m1.988s
: db size[3] ~ 546394112 ~ 522M
n=3 --> N=2
real 1m6.692s
user 1m5.296s
sys 0m0.628s
: db size[2] ~ 191492096 ~ 183M
n=2 --> N=1
real 0m21.692s
user 0m21.137s
sys 0m0.064s
: db size[1] ~ 17326080 ~ 17M
: total size = 2741698560 ~ 2.6G
: total time = 597 sec = 9m57s
##-- ngdb-NN : best neighbors (2nd run)
$ time ./ti-ngramdb-kbest.perl kern01.ti.ng5.db-NN test-100k.i4 >/dev/null
real 10m30.944s # first run : 158 ops/sec ~ 6309 usec/op
real 0m2.148s
user 0m1.836s
sys 0m0.308s
: 46554 ops/sec ~ 21.48 usec/op
$ time ./ti-ngramdb-kbest.perl kern01.ti.ng4.db-NN test-100k.i3 >/dev/null
real[0] 9m57.176s # first run : 167 ops/sec ~ 5971 usec/op
real 0m2.309s
user 0m1.956s
sys 0m0.220s
: 43308 ops/sec ~ 23.09 usec/op
$ time ./ti-ngramdb-kbest.perl kern01.ti.ng3.db-NN test-100k.i2 >/dev/null
real[0] 5m31.264s # first run : 301 ops/sec ~ 3312 usec/op
real 0m2.485s
user 0m2.240s
sys 0m0.236s
: 40241 ops/sec ~ 24.85 usec/op
$ time ./ti-ngramdb-kbest.perl kern01.ti.ng2.db-NN test-100k.i1 >/dev/null
real[0] 1m6.204s # first run : 1510 ops/sec ~ 662 usec/op
real 0m5.374s
user 0m4.012s
sys 0m0.204s
: 18608 ops/sec ~ 53.74 usec/op
##-- ngdb-ww
$ time ./ti-ngrams2db.perl -pk='w*' -pv='w' kern01.ti.ng5 -o=kern01.ti.ng5.db-ww
real 4m0.295s
user 3m44.302s
sys 0m2.020s
: db size[5] = 981983232 = 938M
$ time ./ti-ngramdb-apply.perl -pk='w*' -pv='w' kern01.ti.ng5.db-ww test-100k.i5 -o=/dev/null
real[0] 1m6.204s # first run
real 0m1.314s
user 0m1.048s
sys 0m0.260s
: lookup = 76103 op/sec ~ 76k op/sec ~ 13.14 usec/op
##-- bin-NN
$ time ./ti-ngrams2bin.perl -pk='N5' -pv='N' kern01.ti.ng5 -o=kern01.ti.ng5.bin-NN
real 1m40.058s
user 1m38.874s
sys 0m0.852s
: db size[5] = 724950768 = 693M
$ time ./ti-ngrambin-apply.perl -n=5 kern01.ti.ng5.bin-NN test-100k.i5 -o=/dev/null
real 0m7.229s
user 0m3.336s
sys 0m3.868s
: lookup = 13833 op/sec ~ 14k op/sec ~ 72.29 usec/op
##-- bin-NN : project
$ for N in 4 3 2 1 ; do let n="$N+1"; echo "n=$n --> N=$N"; time ./ti-ngrambin-project.perl -n=$n -N=$N kern01.ti.ng${n}.bin-NN -o=kern01.ti.ng${N}.bin-NN ; done
n=5 --> N=4
real 0m45.216s
user 0m40.143s
sys 0m0.796s
: db size[4] = 518373376 = 511M
n=4 --> N=3
real 0m35.787s
user 0m35.222s
sys 0m0.468s
: db size[3] = 305502032 = 292M
n=3 --> N=2
real 0m21.312s
user 0m20.821s
sys 0m0.236s
: db size[2] = 93741420 = 90M
n=2 --> N=1
real 0m7.401s
user 0m7.308s
sys 0m0.048s
: db size[1] = 6800872 = 6.5M
: total size = 1665521532 = 1.6G
: total time ~ 209.7 sec ~ 3m29s
##-- bin-NN : best neighbors (2nd run)
$ for i in 1 2; do time ./ti-ngrambin-kbest.perl -n=5 kern01.ti.ng5.bin-NN test-100k.i4 >/dev/null; done
real 2m6.380s # first run : 791 op/sec ~ 1263 usec/op
real 0m7.913s
user 0m4.076s
sys 0m3.812s
: 12637 ops/sec ~ 79 usec/op
$ for i in 1 2; do time ./ti-ngrambin-kbest.perl -n=4 kern01.ti.ng4.bin-NN test-100k.i3 >/dev/null; done
real 1m23.691s # first run : 1194 op/sec ~ 836 usec/op
real 0m8.458s
user 0m4.160s
sys 0m4.268s
: 11823 ops/sec ~ 84 usec/op
$ for i in 1 2; do time ./ti-ngrambin-kbest.perl -n=3 kern01.ti.ng3.bin-NN test-100k.i2 >/dev/null; done
real 0m51.573s # first run : 1938 op/sec ~ 515 usec/op
real 0m7.915s
user 0m4.192s
sys 0m3.696s
: 12634 ops/sec ~ 79 usec/op
$ for i in 1 2; do time ./ti-ngrambin-kbest.perl -n=2 kern01.ti.ng2.bin-NN test-100k.i1 >/dev/null; done
real 0m16.230s # first run : 6161 op/sec ~ 162 usec/op
real 0m9.068s
user 0m5.252s
sys 0m3.788s
: 11027 ops/sec ~ 90 usec/op
##-- bin-NN-mmap : best neighbors (2nd run)
$ for i in 1 2; do time ./ti-ngrambin-kbest-mmap.perl -n=5 kern01.ti.ng5.bin-NN test-100k.i4 >/dev/null; done
real 0m56.944s # first run : 1756 ops/sec ~ 569 usec/op
real 0m2.882s
user 0m2.724s
sys 0m0.148s
: 34698 ops/sec ~ 28.82 usec/op
$ for i in 1 2; do time ./ti-ngrambin-kbest-mmap.perl -n=4 kern01.ti.ng4.bin-NN test-100k.i3 >/dev/null; done
real 0m33.513s # first run : 2983 ops/sec ~ 335 usec/op
real 0m2.860s
user 0m2.756s
sys 0m0.092s
: 34965 ops/sec ~ 28.60 usec/op
$ for i in 1 2; do time ./ti-ngrambin-kbest-mmap.perl -n=3 kern01.ti.ng3.bin-NN test-100k.i2 >/dev/null; done
real 0m2.929s # first run : 34141 ops/sec ~ 29.29 usec/op
real 0m2.928s
user 0m2.876s
sys 0m0.040s
: 34153 ops/sec ~ 29.28 usec/op
$ for i in 1 2; do time ./ti-ngrambin-kbest-mmap.perl -n=2 kern01.ti.ng2.bin-NN test-100k.i1 >/dev/null; done
real 0m9.156s # first run : 10921 ops/sec ~ 91.56 usec/op
real 0m4.020s
user 0m3.984s
sys 0m0.024s
: 24875 ops/sec ~ 91.56 usec/op
##-- psql : create
./ti-ngramsql-create.sh: creating database 'ngrams'...
./ti-ngramsql-create.sh: populating ngrams.lex from kern01.types ...
./ti-ngramsql-create.sh: populating ngram tables for db 'ngrams' ...
...
\copy ng5 from 'kern01.ti.ng5'
Time: 121265.326 ms
create unique index ng5_i12345 on ng5 (i1,i2,i3,i4,i5);
Time: 69966.856 ms
create index ng5_i1234f on ng5 (i1,i2,i3,i4,f desc);
Time: 103969.579 ms
insert into ng4 ...
INSERT 0 26726322
Time: 167415.499 ms
create unique index ng4_i1234 on ng4 (i1,i2,i3,i4);
Time: 64281.714 ms
create index ng4_i123f on ng4 (i1,i2,i3,f desc);
Time: 87677.889 ms
insert into ng3 ...
INSERT 0 19093877
Time: 113951.223 ms
create unique index ng3_i123 on ng3 (i1,i2,i3);
Time: 32207.596 ms
create index ng3_i12f on ng3 (i1,i2,f desc);
Time: 44235.165 ms
insert into ng2 ...
INSERT 0 7811785
Time: 53797.833 ms
create unique index ng2_i12 on ng2 (i1,i2);
Time: 12683.215 ms
create index ng2_i1f on ng2 (i1,f desc);
Time: 17495.781 ms
insert into ng1 ...
INSERT 0 850109
Time: 6940.676 ms
create unique index ng1_i1 on ng1 (i1);
Time: 1750.225 ms
create index ng1_f on ng1 (f desc);
Time: 2553.848 ms
select pg_size_pretty(pg_database_size('ngrams'));
ti-ngramsql-create.sh: all done; db size = 8985 MB
: total time ~ 835.9 sec = 13m55s
##-- psql : best neighbors (2nd run)
$ for i in 1 2; do time ./ti-ngramsql-kbest.perl -n=5 ngrams test-100k.i4 >/dev/null; done
real 25m36.225s # first run : 65 op/sec ~ 15362 usec/op
real 11m56.861s
user 0m6.732s
sys 0m1.752s
: 139 op/sec ~ 7168 usec/op
$ for i in 1 2; do time ./ti-ngramsql-kbest.perl -n=4 ngrams test-100k.i3 >/dev/null; done
real 10m44.892s # first run : 155 op/sec ~ 6448 usec/op
real 3m15.463s
user 0m6.284s
sys 0m1.576s
: 511 op/sec ~ 1954 usec/op
$ for i in 1 2; do time ./ti-ngramsql-kbest.perl -n=3 ngrams test-100k.i2 >/dev/null; done
real 4m20.980s # first run : 835 op/sec ~ 2609 usec/op
real 0m12.156s
user 0m3.236s
sys 0m0.864s
: 8226 op/sec ~ 121 usc/op
$ for i in 1 2; do time ./ti-ngramsql-kbest.perl -n=2 ngrams test-100k.i1 >/dev/null; done
real 0m12.625s # first run : 7920 op/sec ~ 126 usec/op
real 0m12.817s
user 0m3.484s
sys 0m0.884s
: 7802 op/sec ~ 128 usec/op
##-----
$ time ./testme.perl ekern kern01.labs # test_enum_text2db
real 0m13.223s ; 47M
$ time ./testme.perl ekern kern01.labs # test_enum_text2mem
real 0m4.302s ; 16M
$ time ./testme.perl ekern kern01.labs # test_enum_text2mem2db
real 0m14.776s ; 47M
##-----
$ time ./testme.perl corpus1.dump-ddc-tabs.files corpus1.ituples.d
real 0m3.770s ; 4.9M (+1.3M tokens.bin)
$ time ./testme.perl corpus1.dump-ddc-tabs.files corpus1.xtuples.d
real 0m2.552s ; 4.9M (+1.3M tokens.bin)
##---- (2nd run)
$ time ./testme.perl kern01.dump-ddc-tabs.files kern01.ituples.d
real 2m42.648s ; 269M (+128M tokens.bin)
: nw=850109 ~ 850k; nl=690208 ~ 690k ; nd=27 ; nx=2534911 ~ 2.5M; ntok=33508987 (33M)
: kern01 is ~ 1/4 size of kerncorpus, and roughly 1/100 size of alle_zeitungen
-> linear growth (if that's what we get) would put is in the neighborhood of 250M tuple-types for alle_zeitungen
: that's still well within the range of an (unsigned) int
: max(signed) = 2**31-1 = 2147483647 = 2G
: max(unsinged) = 2**32-1 = 4294967295 = 4G
$ time ./testme.perl kern01.dump-ddc-tabs.files kern01.xtuples.d
real 3m21.857s ; 267M (+128M tokens.bin)
##---- prepare cofreq relations / corpus1
# CODE: dbdir=corpus1.d; outbase="$dbdir/cof"; for i in 1 2 3 4 5 ; do cmd=(./test-coldb2drel.perl -n=$i $dbdir); echo -en "\$ time" "${cmd[@]}\t"; real=`(time "${cmd[@]}") 2>&1 | grep real`; sz=`du -hsc ${outbase}${i}* | grep total | cut -f1`; echo "# $real : $sz"; done
$ time ./test-coldb2rel.perl -n=1 corpus1.d # real 0m09.116s : 2492 kb
$ time ./test-coldb2rel.perl -n=2 corpus1.d # real 0m16.936s : 4640 kb
$ time ./test-coldb2rel.perl -n=3 corpus1.d # real 0m24.132s : 6432 kb
$ time ./test-coldb2rel.perl -n=4 corpus1.d # real 0m29.541s : 7988 kb
$ time ./test-coldb2rel.perl -n=5 corpus1.d # real 0m34.321s : 9376 kb
# TOTAL TIME = 1:54 , TOTAL SIZE = 30.9M = 95x ntoks = 0.95x ddcsize
##---- prepare cofreq + distance relation / corpus1
$ time ./test-coldb2drel.perl -n=1 corpus1.d # real 0m9.818s : 2876 kb
#: read + sort + uniq : 2.885s
#: read + sort + uniq + write : 9.851s
#: read + sort + uniq + file : 2.862s
#: read + sort + uniq + file +write : 3.741s !!!!!
$ time ./test-coldb2drel.perl -n=2 corpus1.d # real 0m19.788s : 5972 kb
$ time ./test-coldb2drel.perl -n=3 corpus1.d # real 0m30.309s : 9096 kb
$ time ./test-coldb2drel.perl -n=4 corpus1.d # real 0m39.998s : 12160 kb
$ time ./test-coldb2drel.perl -n=5 corpus1.d # real 0m49.580s : 15140 kb
# TOTAL TIME (==time(n=5)) = 50s , TOTAL SIZE = 15.1M = 47x ntoks = 0.46x ddcsize
##---- prepare cofreq + distance relation, in-memory counting / corpus1
$ time ./test-coldb2drel+mem.perl -n=1 corpus1.d # real 0m02.263s : 2876 kb
$ time ./test-coldb2drel+mem.perl -n=2 corpus1.d # real 0m04.174s : 5972 kb
$ time ./test-coldb2drel+mem.perl -n=3 corpus1.d # real 0m06.194s : 9096 kb
$ time ./test-coldb2drel+mem.perl -n=4 corpus1.d # real 0m08.143s : 12160 kb
$ time ./test-coldb2drel+mem.perl -n=5 corpus1.d # real 0m10.207s : 15140 kb
# TOTAL TIME (==time(n=5)) = 10s , TOTAL SIZE = 15.1M = 47x ntoks = 0.46x ddcsize
##---- prepare cofreq + distance relation, bdb counting / corpus1
$ time ./test-coldb2drel+mem.perl -bdb -n=1 corpus1.d # real 0m10.046s : 2876 kb
$ time ./test-coldb2drel+mem.perl -bdb -n=2 corpus1.d # real 0m20.192s : 5972 kb
$ time ./test-coldb2drel+mem.perl -bdb -n=3 corpus1.d # real 0m32.622s : 9096 kb
$ time ./test-coldb2drel+mem.perl -bdb -n=4 corpus1.d # real 0m45.266s : 12160 kb
$ time ./test-coldb2drel+mem.perl -bdb -n=5 corpus1.d # real 1m27.383s : 15140 kb
##---- prepare cofreq + distance relation, +tempfile / corpus1
$ time ./test-coldb2drel+tmp.perl -n=1 corpus1.d # real 0m03.747s : 2876 kb
$ time ./test-coldb2drel+tmp.perl -n=2 corpus1.d # real 0m05.969s : 5972 kb
$ time ./test-coldb2drel+tmp.perl -n=3 corpus1.d # real 0m09.791s : 9096 kb
$ time ./test-coldb2drel+tmp.perl -n=4 corpus1.d # real 0m11.774s : 12160 kb
$ time ./test-coldb2drel+tmp.perl -n=5 corpus1.d # real 0m14.115s : 15140 kb
##---- prepare cofreq + distance relation, flat / corpus1
$ time ./test-coldb2drel-flat.perl -n=1 corpus1.d # real 0m11.097s : 4192 kb : 1.45x tiered-size
$ time ./test-coldb2drel-flat.perl -n=2 corpus1.d # real 0m20.688s : 8660 kb : 1.45x tiered-size
$ time ./test-coldb2drel-flat.perl -n=3 corpus1.d # real 0m31.097s : 13172 kb : 1.45x tiered-size
$ time ./test-coldb2drel-flat.perl -n=4 corpus1.d # real 0m40.963s : 17604 kb : 1.45x tiered-size
$ time ./test-coldb2drel-flat.perl -n=5 corpus1.d # real 0m51.680s : 21904 kb : 1.45x tiered-size
##---- prepare cofreq + distance relation / kern01-1k
$ time ./test-coldb2drel.perl -n=1 kern01-1k.d # real 1m22.143s : 25 Mb
$ time ./test-coldb2drel.perl -n=2 kern01-1k.d # real 2m44.623s : 51 Mb
$ time ./test-coldb2drel.perl -n=3 kern01-1k.d # real 4m05.433s : 76 Mb
$ time ./test-coldb2drel.perl -n=4 kern01-1k.d # real 5m26.204s : 100 Mb
$ time ./test-coldb2drel.perl -n=5 kern01-1k.d # real 6m48.737s : 124 Mb
# TOTAL TIME (==time(n=5)) = 50s , TOTAL SIZE = 15.1M = 6.6x ntoks = 0.16x ddcsize
##---- prepare cofreq + distance relation, +tempfile / kern01-1k
$ time ./test-coldb2drel+tmp.perl -n=1 kern01-1k.d # real 0m26.927s : 25584 kb
$ time ./test-coldb2drel+tmp.perl -n=2 kern01-1k.d # real 0m47.041s : 51112 kb
$ time ./test-coldb2drel+tmp.perl -n=3 kern01-1k.d # real 1m07.340s : 76312 kb
$ time ./test-coldb2drel+tmp.perl -n=4 kern01-1k.d # real 1m26.855s : 100604 kb
$ time ./test-coldb2drel+tmp.perl -n=5 kern01-1k.d # real 1m44.417s : 123952 kb
##---- prepare cofreq + distance relation, +tempfile / kern01
## ntok=32002213~32M ; size(tokens.dat)=257k ; size(ddcdir)=1.3G
$ time ./test-coldb2drel+tmp.perl -n=1 kern01.d # real 6m18.288s : 266 Mb
$ time ./test-coldb2drel+tmp.perl -n=2 kern01.d # real 13m21.128s : 552 Mb
$ time ./test-coldb2drel+tmp.perl -n=3 kern01.d # real 19m45.925s : 837 Mb
$ time ./test-coldb2drel+tmp.perl -n=4 kern01.d # real 25m17.009s : 1.1 Gb
$ time ./test-coldb2drel+tmp.perl -n=5 kern01.d # real 30m47.828s : 1.4 Gb
# TOTAL TIME (==time(n=5)) = 30m48s , TOTAL SIZE = 1.4G = 43x ntoks = 1.1x ddcsize
##==============================================================
## + filters
#CODE: dbdir=corpus1.d; outbase="$dbdir/cof"; for i in 1 2 3 4 5 ; do cmd=(./test-coldb2rel+tmp.perl -n=$i $dbdir); echo -en "\$ time" "${cmd[@]}\t"; real=`(time "${cmd[@]}") 2>&1 | grep real`; sz=`du -hsc ${outbase}${i}* | grep total | cut -f1`; echo "# $real : $sz"; done
##---- prepare cof -dist / corpus1 + filters
$ time ./test-coldb2rel+tmp.perl -n=1 corpus1.d # real 0m0.992s : 1.2M
$ time ./test-coldb2rel+tmp.perl -n=2 corpus1.d # real 0m1.557s : 2.0M
$ time ./test-coldb2rel+tmp.perl -n=3 corpus1.d # real 0m2.065s : 2.7M
$ time ./test-coldb2rel+tmp.perl -n=4 corpus1.d # real 0m2.474s : 3.2M
$ time ./test-coldb2rel+tmp.perl -n=5 corpus1.d # real 0m2.886s : 3.6M ~ 112k tok/sec ;
# TOTAL: TIME = 9.9s , SIZE = 12.7M ~ 32k tok/sec , 39 bytes/tok
# FIXED: TIME = 2.8s , SIZE = 3.6M ~ 112k tok/sec , 11 bytes/tok
##---- prepare cof -dist / kern01-1k + filters
$ time ./test-coldb2rel+tmp.perl -n=1 kern01-1k.d # real 0m8.347s : 12M
$ time ./test-coldb2rel+tmp.perl -n=2 kern01-1k.d # real 0m15.127s : 20M
$ time ./test-coldb2rel+tmp.perl -n=3 kern01-1k.d # real 0m20.532s : 28M
$ time ./test-coldb2rel+tmp.perl -n=4 kern01-1k.d # real 0m24.239s : 34M
$ time ./test-coldb2rel+tmp.perl -n=5 kern01-1k.d # real 0m27.842s : 39M
# TOTAL: TIME = 1:36.087 , SIZE = 133M ~ 23.7k tok/sec , 58 bytes/tok
# FIXED: TIME = 27.842 , SIZE = 39M ~ 81.8k tok/sec , 17 bytes/tok
##---- prepare cof -dist / kern01 + filters
$ time ./test-coldb2rel+tmp.perl -n=1 kern01.d # real 1m56.065s : 138M
$ time ./test-coldb2rel+tmp.perl -n=2 kern01.d # real 3m24.365s : 243M
$ time ./test-coldb2rel+tmp.perl -n=3 kern01.d # real 4m43.557s : 331M
$ time ./test-coldb2rel+tmp.perl -n=4 kern01.d # real 5m11.975s : 404M
$ time ./test-coldb2rel+tmp.perl -n=5 kern01.d # real 6m04.759s : 465M ~ 888 tok/sec
# TOTAL: TIME = 21:20.721 , SIZE = 1.58G ~ 24.9k tok/sec , 49 bytes/tok
# FIXED: TIME = 6:04.759 , SIZE = 465M ~ 87.7k tok/sec , 15 bytes/tok
##-- projection for alle_zeitungen using 80k tok/sec, 20 bytes/tok
## ntok=3470364249 ~ 3.47G
## : EST TIME = 12:02:59 , EST SIZE = 69407284980 bytes = 69G
##
## : for comparison, total ddc index size on data = 175G
##==============================================================
## +filters, +cc
$ time ./relcount 5 < corpus1.d/tokens.dat >/dev/null # real 0m00.300s , 0.3% mem ~ 1.08M tok/sec
$ time ./relcount 5 < kern01-1k.d/tokens.dat >/dev/null # real 0m03.444s , 3.7% mem ~ 661k tok/sec
$ time ./relcount 5 < kern01.d/tokens.dat >/dev/null # real 0m57.621s , 45.7% mem ~ 555k tok/sec
$ time ./relgen 5 < corpus1.d/tokens.dat >/dev/null # real 0m00.134s ~ 2.41M tok/sec
$ time ./relgen 5 < kern01-1k.d/tokens.dat >/dev/null # real 0m01.104s ~ 2.06M tok/sec
$ time ./relgen 5 < kern01.d/tokens.dat >/dev/null # real 0m14.922s ~ 2.14M tok/sec
$ time ./relgen.perl -n=5 corpus1.d/tokens.dat >/dev/null # real 0m0.719s ~ 450k tok/sec
$ time ./relgen.perl -n=5 kern01-1k.d/tokens.dat >/dev/null # real 0m5.123s ~ 445k tok/sec
$ time ./relgen.perl -n=5 kern01.d/tokens.dat >/dev/null # real 1m8.743s ~ 466k tok/sec
$ time ./relgen 5 < corpus1.d/tokens.dat | csort.sh -n -k1 -k2 | cuniq.sh -c >/dev/null # real 0m00.984s ~ 329k tok/sec
$ time ./relgen 5 < kern01-1k.d/tokens.dat | csort.sh -n -k1 -k2 | cuniq.sh -c >/dev/null # real 0m09.320s ~ 244k tok/sec
$ time ./relgen 5 < kern01.d/tokens.dat | csort.sh -n -k1 -k2 | cuniq.sh -c >/dev/null # real 2m35.565s ~ 206k tok/sec
$ ./relgen 5 <corpus1.d/tokens.dat >r5.tmp; time csort.sh -n -k1 -k2 r5.tmp | cuniq.sh -c >/dev/null # real 0m00.349s
$ ./relgen 5 <kern01-1k.d/tokens.dat >r5.tmp; time csort.sh -n -k1 -k2 r5.tmp | cuniq.sh -c >/dev/null # real 0m03.027s
$ ./relgen 5 <kern01.d/tokens.dat >r5.tmp; time csort.sh -n -k1 -k2 r5.tmp | cuniq.sh -c >/dev/null # real 1m01.690s
#
#... but sort uses parallel execution if called on a disk file (even via input redirection), so
#
# corpus1: time(csortuc) = time(relgen+csortuc)-time(relgen) = 0m00.850s ~ 381k tok/sec
# kern01-1k: time(csortuc) = time(relgen+csortuc)-time(relgen) = 0m08.216s ~ 227k tok/sec
# kern01: time(csortuc) = time(relgen+csortuc)-time(relgen) = 2m20.643s ~ 228k tok/sec
##==============================================================
## profiling
##
## $ ./coldb-export.perl kern01.d -o kern01.export
## $ tt-dictapply.perl kern01.export/xenum.sdat kern01.export/xf.dat | tt-cut.awk '$2,$3' | tt-1grams.perl -union - >kern01.export/lf.dat
## $ tt-eval.perl -noprint 'print "$_[1]\n" if ($_[0]>=100);' kern01.export/lf.dat > kern01.export/lf100+.dat
## $ shuf -n 100 kern01.export/l+100.dat >test-100.l
## $ shuf -n 1000 kern01.export/l+100.dat >test-1k.l
## $ shuf -n 10000 kern01.export/l+100.dat >test-10k.l
## $ sudo sh -c 'echo 1 > /proc/sys/vm/drop_caches' # clear filesystem cache
$ time ./test-profile.perl kern01.d test-100.l # real 0m2.587s ~ 387 ops/sec (1k, 1st run)
$ time ./test-profile.perl kern01.d test-100.l # real 0m0.121s ~ 8.3k ops/sec (1k, 2nd run)
$ time ./test-profile.perl kern01.d test-1k.l # real 0m6.631s ~ 151 ops/sec (1k, 1st run)
$ time ./test-profile.perl kern01.d test-1k.l # real 0m0.133s ~ 7.52k ops/sec (1k, 2nd run)
$ time ./test-profile.perl kern01.d test-10k.l # real 0m7.464s ~ 1.34k ops/sec (10k, 1st run)
$ time ./test-profile.perl kern01.d test-10k.l # real 0m0.276s ~ 36.23k ops/sec (10k, 2nd run)
#... no substantial change in speed by adding -[no]mi -[no]ld -[no]strings
# BUT:
$ time ./coldb-profile.perl kern01.d Haus | sort -nrk5 | head # real 0m31.878s ~ 0.031 ops/sec (1, 1st run)
$ time ./coldb-profile.perl kern01.d Haus | sort -nrk5 | head # real 0m02.647s ~ 0.377 ops/sec (1, 2nd run)
# ... looks like we need to check test consistency and/or have a look at the profiler!
# first runs:
$ time ./coldb-profile.perl kern01.d Haus -nostrings -nomi -nold -noout >/dev/null # real 0m02.956s ~ 0.338 ops/sec (base)
$ time ./coldb-profile.perl kern01.d Haus -nostrings -nomi -nold -text >/dev/null # real 0m03.101s ~ 0.322 ops/sec (text: 6.89 ops/sec)
$ time ./coldb-profile.perl kern01.d Haus -nostrings -nomi -nold -json >/dev/null # real 0m04.219s ~ 0.237 ops/sec (json: 0.792 ops/sec)
$ time ./coldb-profile.perl kern01.d Haus -nostrings -nomi -ld -noout >/dev/null # real 0m04.478s ~ 0.223 ops/sec (dice: 0.657 ops/sec)
$ time ./coldb-profile.perl kern01.d Haus -nostrings -mi -nold -noout >/dev/null # real 0m04.944s ~ 0.202 ops/sec (milf: 0.503 ops/sec)
$ time ./coldb-profile.perl kern01.d Haus -strings -nomi -nold -noout >/dev/null # real 0m34.390s ~ 0.029 ops/sec (stringify: .0318 ops/sec)
#-- new pure-file enum (test:i2s)
$ time ./enum-i2s.perl lenum enum-10k.dat >/dev/null # real 0m0.891s ~ 11k ops/sec (n=10k, 1st run)
$ time ./enum-i2s.perl lenum enum-10k.dat >/dev/null # real 0m0.090s ~ 111k ops/sec (n=10k, 2nd run)
--
$ time ./enum-i2s.perl lenum enum-100.dat >/dev/null # real 0m0.446s ~ 224 ops/sec (n=100, 1st run)
$ time ./enum-i2s.perl lenum enum-100.dat >/dev/null # real 0m0.008s ~ 12.5k ops/sec (n=100, 2nd run)
##
##-- new pure-file enum (test:s2i)
$ time ./enum-s2i.perl lenum enum-10k.rdat >/dev/null # real 0m3.506s ~ 2.85k ops/sec (n=10k, 1st run)
$ time ./enum-s2i.perl lenum enum-10k.rdat >/dev/null # real 0m1.181s ~ 8.46k ops/sec (n=10k, 2nd run)
--
$ time ./enum-s2i.perl lenum enum-100.rdat >/dev/null # real 0m0.976s ~ 102 ops/sec (n=100, 1st run)
$ time ./enum-s2i.perl lenum enum-100.rdat >/dev/null # real 0m0.022s ~ 4.54k ops/sec (n=100, 1nd run)
#-- pure-file EnumFile (test:i2s)
$ time ./ef-i2s.perl lef enum-60k.dat >/dev/null # real 0m2.784s ~ 21.5k ops/sec (n=60k, 1st run)
$ time ./ef-i2s.perl lef enum-60k.dat >/dev/null # real 0m0.731s ~ 82.1k ops/sec (n=60k, 2nd run)
$ time ./ef-i2s.perl lef enum-10k.dat >/dev/null # real 0m2.388s ~ 4.18k ops/sec (n=10k, 1st run)
$ time ./ef-i2s.perl lef enum-10k.dat >/dev/null # real 0m0.180s ~ 55.5k ops/sec (n=10k, 2nd run)
$ time ./ef-i2s.perl lef enum-100.dat >/dev/null # real 0m1.262s ~ 79.2 ops/sec (n=100, 1st run)
$ time ./ef-i2s.perl lef enum-100.dat >/dev/null # real 0m0.074s ~ 1.35k ops/sec (n=100, 2nd run)
##
##-- pure-file EnumFile (test:s2i)
$ time ./ef-s2i.perl lef enum-10k.rdat >/dev/null # real 0m6.270s ~ 1.59k ops/sec (n=10k, 1st run)
$ time ./ef-s2i.perl lef enum-10k.rdat >/dev/null # real 0m1.258s ~ 7.95k ops/sec (n=10k, 2nd run)
$ time ./ef-s2i.perl lef enum-100.rdat >/dev/null # real 0m4.235s ~ 23.6 ops/sec (n=100, 1st run)
$ time ./ef-s2i.perl lef enum-100.rdat >/dev/null # real 0m0.087s ~ 1.15k ops/sec (n=100, 2nd run)
#-- pure-file EnumFile::MMap (test:i2s)
# size = 13914360 bytes ~ 14M / 32M tok = 0.43 bytes/tok --> 0.43 * 3.47G = 1.5G
# ... but Heaps' Law can be expected to apply (log-linear growth: ntyp = K*ntok^beta ) [TODO: estimate params!]
$ time ./ef-i2s.perl -map lef enum-60k.dat >/dev/null # real 0m1.662s ~ 36.1k ops/sec (n=60k, 1st run) ~ 0.60 ef !!
$ time ./ef-i2s.perl -map lef enum-60k.dat >/dev/null # real 0m0.340s ~ 176.5k ops/sec (n=60k, 2nd run) ~ 0.47 ef !!
$ time ./ef-i2s.perl -map lef enum-10k.dat >/dev/null # real 0m2.369s ~ 4.22k ops/sec (n=10k, 1st run) ~ 0.99 ef
$ time ./ef-i2s.perl -map lef enum-10k.dat >/dev/null # real 0m0.125s ~ 80.0 k ops/sec (n=10k, 2nd run) ~ 0.69 ef
$ time ./ef-i2s.perl -map lef enum-100.dat >/dev/null # real 0m1.245s ~ 80 ops/sec (n=100, 1st run) ~ 0.98 ef
$ time ./ef-i2s.perl -map lef enum-100.dat >/dev/null # real 0m0.080s ~ 1.25k ops/sec (n=100, 2nd run) ~ 1.08 ef
##
##-- pure-file EnumFile::MMap (test:s2i)
$ time ./ef-s2i.perl -map lef enum-10k.rdat >/dev/null # real 0m2.305s ~ 4.3k ops/sec (n=10k, 1st run) ~ 0.36 ef
$ time ./ef-s2i.perl -map lef enum-10k.rdat >/dev/null # real 0m0.343s ~ 291k ops/sec (n=10k, 2nd run) ~ 0.27 ef
$ time ./ef-s2i.perl -map lef enum-100.rdat >/dev/null # real 0m2.095s ~ 47 ops/sec (n=100, 1st run) ~ 0.49 ef
$ time ./ef-s2i.perl -map lef enum-100.rdat >/dev/null # real 0m0.080s ~ 1.3k ops/sec (n=100, 2nd run) ~ 0.92 ef
##-- vs old db-based enum (cache=32M, psize=4k)
$ time ./edb-i2s.perl kern01.d/lenum enum-10k.dat >/dev/null # real 0m7.648s ~ 1.30k ops/sec (n=10k, psize=4k, 1st run) ~ 3.2 ef
$ time ./edb-i2s.perl kern01.d/lenum enum-10k.dat >/dev/null # real 0m0.171s ~ 58.4 k ops/sec (n=10k, psize=4k, 2nd run) ~ 0.95 ef
$ time ./edb-i2s.perl kern01.d/lenum enum-100.dat >/dev/null # real 0m2.295s ~ 4.35k ops/sec (n=100, psize=4k, 1st run) ~ 1.8 ef
$ time ./edb-i2s.perl kern01.d/lenum enum-100.dat >/dev/null # real 0m0.077s ~ 130 k ops/sec (n=100, psize=4k, 2nd run) ~ 1.0 ef
##
##-- vs old db-based enum (cache=32M, psize=32k)
$ time ./edb-i2s.perl kern01.d1/lenum enum-10k.dat >/dev/null # real 0m2.078s ~ 4.8k ops/sec (n=10k, psize=32k, 1st run) ~ 0.87 ef
$ time ./edb-i2s.perl kern01.d1/lenum enum-10k.dat >/dev/null # real 0m0.162s ~ 61.7k ops/sec (n=10k, psize=32k, 2nd run) ~ 0.90 ef
$ time ./edb-i2s.perl kern01.d1/lenum enum-100.dat >/dev/null # real 0m2.111s ~ 47.3 ops/sec (n=100, psize=32k, 1st run) ~ 1.6 ef
$ time ./edb-i2s.perl kern01.d1/lenum enum-100.dat >/dev/null # real 0m0.079s ~ 1.26k ops/sec (n=100, psize=32k, 2nd run) ~ 1.1 ef
##
##-- vs old db-based enum (cache=32M, psize=64k=max) / hacked
$ time ./edb-i2s.perl kern01.d1/lenum enum-10k.dat >/dev/null # real 0m2.146s ~ 4.7k ops/sec (n=10k, psize=64k, 1st run) ~ .90 ef
$ time ./edb-i2s.perl kern01.d1/lenum enum-10k.dat >/dev/null # real 0m0.163s ~ 61.3k ops/sec (n=10k, psize=64k, 2nd run) ~ .91 ef
$ time ./edb-i2s.perl kern01.d1/lenum enum-100.dat >/dev/null # real 0m1.473s ~ 67.8 ops/sec (n=100, psize=64k, 1st run) ~ 1.2 ef
$ time ./edb-i2s.perl kern01.d1/lenum enum-100.dat >/dev/null # real 0m0.076s ~ 1.3k ops/sec (n=100, psize=64k, 2nd run) ~ 1.0 ef
##
##-- vs old db-based enum (cache=32M, psize=64k=max)
# times(ef) : 60k=(2.784 0.731), 10k=(2.388 0.180), 100=(1.262 0.074)
$ time ./edb-i2s.perl kern01.d1/lenum enum-60k.dat >/dev/null # real 0m3.621s ~ 16k ops/sec (n=60k, psize=64k, 1st run) ~ 1.3 ef
$ time ./edb-i2s.perl kern01.d1/lenum enum-60k.dat >/dev/null # real 0m0.552s ~ 109k ops/sec (n=60k, psize=64k, 2nd run) ~ 0.76 ef
$ time ./edb-i2s.perl kern01.d1/lenum enum-10k.dat >/dev/null # real 0m3.026s ~ 3.3k ops/sec (n=10k, psize=64k, 1st run) ~ 1.3 ef
$ time ./edb-i2s.perl kern01.d1/lenum enum-10k.dat >/dev/null # real 0m0.162s ~ 62k ops/sec (n=10k, psize=64k, 2nd run) ~ 0.9 ef
$ time ./edb-i2s.perl kern01.d1/lenum enum-100.dat >/dev/null # real 0m1.782s ~ 56k ops/sec (n=100, psize=64k, 1st run) ~ 1.4 ef
$ time ./edb-i2s.perl kern01.d1/lenum enum-100.dat >/dev/null # real 0m0.082s ~ 1.2k ops/sec (n=100, psize=64k, 2nd run) ~ 1.1 ef
##-- concrete tests: dbenum
$ time ./coldb-profile.perl kern01.d1 Haus -strings -nomi -nold -noout # real 0m8.491s (n=58k, 1st run)
$ time ./coldb-profile.perl kern01.d1 Haus -strings -nomi -nold -noout # real 0m1.428s (n=58k, 2nd run)
--
$ time ./coldb-profile.perl kern01.d1 Mann -strings -nomi -nold -noout # real 0m9.332s (n=76k, 1st run) [-str=2.899s] ~ 11.8k str/sec
$ time ./coldb-profile.perl kern01.d1 Mann -strings -nomi -nold -noout # real 0m1.846s (n=76k, 2nd run) [-str=0.780s] ~ 71.3k str/sec
--
$ time ./coldb-profile.perl kern01.d1 Blatt -strings -nomi -nold -noout # real 0m9.003s (n=23k, 1st run) [-str=2.985s] ~ 3.8k str/sec
$ time ./coldb-profile.perl kern01.d1 Blatt -strings -nomi -nold -noout # real 0m0.670s (n=23k, 2nd run) [-str=0.315s] ~ 64.7k str/sec
--
$ time ./coldb-profile.perl kern01.d1 Hund -strings -nomi -nold -noout # real 0m7.740s (n=8.5k, 1st run) [-str=3.312s] ~ 1.9k str/sec
$ time ./coldb-profile.perl kern01.d1 Hund -strings -nomi -nold -noout # real 0m0.335s (n=8.5k, 2nd run) [-str=0.195s] ~ 61.1k str/sec
--
$ time ./coldb-profile.perl kern01.d1 Maus -strings -nomi -nold -noout # real 0m7.181s (n=1.4k, 1st run) [-str=3.091s] ~ 342 str/sec
$ time ./coldb-profile.perl kern01.d1 Maus -strings -nomi -nold -noout # real 0m0.186s (n=1.4k, 2nd run) [-str=0.136s] ~ 28k str/sec
##-- concrete tests: EnumFile::MMap
$ time ./coldb-profile.perl kern01.de Haus -strings -nomi -nold -noout # real 0m6.436s (n=58k, 1st run) ~ 9.0k ops/sec : 0.75 dbe
$ time ./coldb-profile.perl kern01.de Haus -strings -nomi -nold -noout # real 0m1.048s (n=58k, 2nd run) ~ 55.3k ops/sec : 0.72 dbe
--
$ time ./coldb-profile.perl kern01.de Mann -strings -nomi -nold -noout # real 0m7.383s (n=76k, 1st run) ~ 10.3k ops/sec : 0.79 dbe
$ time ./coldb-profile.perl kern01.de Mann -strings -nomi -nold -noout # real 0m1.320s (n=76k, 1st run) ~ 57.6k ops/sec : 0.71 dbe
--
$ time ./coldb-profile.perl kern01.de Blatt -strings -nomi -nold -noout # real 0m5.586s (n=23k, 1st run) ~ 4.1k ops/sec : 0.62 dbe
$ time ./coldb-profile.perl kern01.de Blatt -strings -nomi -nold -noout # real 0m0.475s (n=23k, 2nd run) ~ 48.4k ops/sec : 0.71 dbe
--
$ time ./coldb-profile.perl kern01.de Hund -strings -nomi -nold -noout # real 0m5.552s (n=8.5k, 1st run) ~ 1.5k ops/sec : 0.71 dbe
$ time ./coldb-profile.perl kern01.de Hund -strings -nomi -nold -noout # real 0m0.265s (n=8.5k, 2nd run) ~ 32.1k ops/sec : 0.79 dbe
--
$ time ./coldb-profile.perl kern01.de Maus -strings -nomi -nold -noout # real 0m4.868s (n=1.4k, 1st run) ~ 287.6 ops/sec : 0.68 dbe
$ time ./coldb-profile.perl kern01.de Maus -strings -nomi -nold -noout # real 0m0.148s (n=1.4k, 2nd run) ~ 9.5k ops/sec : 0.79 dbe
##-- multi-timing +MultiMapFile
$ ./timeprof.sh kern01.d1 Haus Mann Blatt Hund Maus
Haus 6.70 0.87
Mann 5.15 1.12
Blatt 3.99 0.41
Hund 3.19 0.23
Maus 3.20 0.14
##-- multi-timing, cfmin=1 (dbsize/kern01=515M)
$ ./timeprof.sh kern01.d2 Haus Mann Blatt Hund Maus
Haus 3.31 0.32
Mann 3.80 0.41
Blatt 3.25 0.18
Hund 4.11 0.14
Maus 3.91 0.13
##-- multi-timing, cfmin=2 (dbsize/kern01=127M)
## --> new size estimate = 131961414 bytes / 32002213 tok ~ 127MB / 31Mtok = 4.12 bytes/tok
## --> for kern.d = 494198183 bytes / 122235214 tok ~ 427MB / 116Mtok = 4.04 bytes/tok
## --> projection for alle_zeitungen (ntok=3470364249 ~ 3.3G): 3.3G tok * 4.12 bytes/tok = 13.6GB
$ ./timeprof.sh kern01.d2 Haus Mann Blatt Hund Maus
Haus 3.31 0.32
Mann 3.80 0.41
Blatt 3.25 0.18
Hund 4.11 0.14
Maus 3.91 0.13
##-- multi-timing, cfmin=4 (dbsize/kern01=74M)
$ ./timeprof.sh kern01.d4 Haus Mann Blatt Hund Maus
Haus 3.78 0.18
Mann 3.72 0.21
Blatt 3.09 0.13
Hund 2.52 0.13
Maus 2.55 0.12
##-- for full kern.d (122M tok, cfmin=2):
Haus 11.26 0.71
Mann 14.15 1.06
Blatt 9.69 0.25
Hund 8.80 0.20
Maus 6.14 0.14
##-- stringification breakdown (1st runs, kern01.d[cfmin=2])
$ time ./coldb-profile.perl kern.d Mann -noout -nodates -nolemmas # real 0m2.630s [+2.630 = 100.0%]
$ time ./coldb-profile.perl kern.d Mann -noout -dates -nolemmas # real 0m4.423s [+1.793 = 68.2%]
$ time ./coldb-profile.perl kern.d Mann -noout -dates -lemmas # real 0m5.428s [+1.005 = 38.2%]
##
##-- stringification breakdown (1st runs, kern.d[cfmin=2])
$ time ./coldb-profile.perl kern.d Mann -noout -nodates -nolemmas # real 0m04.827s [+4.827 = 100.0%]
$ time ./coldb-profile.perl kern.d Mann -noout -dates -nolemmas # real 0m08.230s [+3.403 = 70.5%]
$ time ./coldb-profile.perl kern.d Mann -noout -dates -lemmas # real 0m11.684s [+3.454 = 71.6%]
##========================================
## union
$ ./dcdb-create.perl -l kern01-1k.files kern02-1k.files -o kern12-1k.d # 50.975s, 17MB
--
$ ./dcdb-create.perl -l kern01-1k.files -o kern01-1k.d # 35.683s, 11MB
$ ./dcdb-create.perl -l kern02-1k.files -o kern02-1k.d # 18.603s, 7MB : TOTAL = 54.466, 18MB
--
$ ./dcdb-create.perl -u kern01-1k.d kern02-1k.d -o kern12-1k.u # 11.230s, 16MB
##========================================
## sizes (-bysent vs -bydoc)
## + size(ddc-tabs): 27MB; size(ddc-index) ~= 35.6M (= size(zeit01) * nfiles(1k)/nfiles(zeit01) = 2158M * 1000/60571)
$ ./dcdb-create.perl -l zeit01-1k.files -o zeit01-1k.bysent-d5.d -bysent -dmax=5 # 7.0M, 21.403s
$ ./dcdb-create.perl -l zeit01-1k.files -o zeit01-1k.bysent-d10.d -bysent -dmax=10 # 7.5M, 25.478s
$ ./dcdb-create.perl -l zeit01-1k.files -o zeit01-1k.bysent-d20.d -bysent -dmax=20 # 7.9M, 29.046s
$ ./dcdb-create.perl -l zeit01-1k.files -o zeit01-1k.bysent-d40.d -bysent -dmax=40 # 7.9M, 29.392s
--
$ ./dcdb-create.perl -l zeit01-1k.files -o zeit01-1k.bypara-d5.d -bypara -dmax=5 # 7.5M, 24.584s
$ ./dcdb-create.perl -l zeit01-1k.files -o zeit01-1k.bypara-d10.d -bypara -dmax=10 # 9.5M, 32.672s
$ ./dcdb-create.perl -l zeit01-1k.files -o zeit01-1k.bypara-d20.d -bypara -dmax=20 # 14.0M, 43.590s
$ ./dcdb-create.perl -l zeit01-1k.files -o zeit01-1k.bypara-d40.d -bypara -dmax=40 # 18.0M, 57.409s
--
$ ./dcdb-create.perl -l zeit01-1k.files -o zeit01-1k.bydoc-d5.d -bydoc -dmax=5 # 7.6M, 24.130s
$ ./dcdb-create.perl -l zeit01-1k.files -o zeit01-1k.bydoc-d10.d -bydoc -dmax=10 # 11.0M, 37.948s
$ ./dcdb-create.perl -l zeit01-1k.files -o zeit01-1k.bydoc-d20.d -bydoc -dmax=20 # 18.0M, 57.126s
$ ./dcdb-create.perl -l zeit01-1k.files -o zeit01-1k.bydoc-d40.d -bydoc -dmax=40 # 34.0M, 1m37.068s
##========================================
## sizes (+attrs, v0.03_0001)
## + size(ddc-tabs): 27MB; size(ddc-index) ~= 35.6M (= size(zeit01) * nfiles(1k)/nfiles(zeit01) = 2158M * 1000/60571)
## + reference = size(ddc_index) 35.6M
$ ./dcdb-create.perl -l zeit01-1k.files -o zeit01-1k.d1l -O=attrs=l -cfmin=1 # 23.0M, 27.163s ~ 0.65x ddc
$ ./dcdb-create.perl -l zeit01-1k.files -o zeit01-1k.d1lp -O=attrs=l,p -cfmin=1 # 26.0M, 26.725s ~ 0.73x ddc
$ ./dcdb-create.perl -l zeit01-1k.files -o zeit01-1k.d1lpw -O=attrs=l,p,w -cfmin=1 # 32.0M, 28.067s ~ 0.90x ddc
--
$ ./dcdb-create.perl -l zeit01-1k.files -o zeit01-1k.d2l -O=attrs=l -cfmin=2 # 7.0M ~ 0.20x ddc
$ ./dcdb-create.perl -l zeit01-1k.files -o zeit01-1k.d2lp -O=attrs=l,p -cfmin=2 # 9.1M ~ 0.26x ddc
$ ./dcdb-create.perl -l zeit01-1k.files -o zeit01-1k.d2lpw -O=attrs=l,p,w -cfmin=2 # 15.0M ~ 0.42x ddc
====
$ b=doc.basename
$ ./dcdb-create.perl -l zeit01-1k.files -o zeit01-1k.d1lb -O=attrs=l,$b -cfmin=1 # 30MB ~ 0.90x ddc
$ ./dcdb-create.perl -l zeit01-1k.files -o zeit01-1k.d1lpb -O=attrs=l,p,$b -cfmin=1 # 34MB ~ 0.96x ddc
$ ./dcdb-create.perl -l zeit01-1k.files -o zeit01-1k.d1lpwb -O=attrs=l,p,w,$b -cfmin=1 # 41MB ~ 1.15x ddc
--
$ ./dcdb-create.perl -l zeit01-1k.files -o zeit01-1k.d2lb -O=attrs=l,$b -cfmin=2 # 14MB ~ 0.39x ddc
$ ./dcdb-create.perl -l zeit01-1k.files -o zeit01-1k.d2lpb -O=attrs=l,p,$b -cfmin=2 # 17MB ~ 0.48x ddc
$ ./dcdb-create.perl -l zeit01-1k.files -o zeit01-1k.d2lpwb -O=attrs=l,p,w,$b -cfmin=2 # 24MB ~ 0.67x ddc
##========================================
## sizes (+attrs, v0.03_0001, kern01.d)
## + size(ddc-tabs): 707M; size(ddc-index) ~= 1264MB
$ ./dcdb-create.perl -l kern01.files -o kern01.d -O=attrs=l -cfmin=2 # 127M ~ 0.10x ddc
$ ./dcdb-create.perl -l kern01.files -o kern01.dlp -O=attrs=l,p -cfmin=2 # 146M ~ 0.12x ddc
$ ./dcdb-create.perl -l kern01.files -o kern01.dlpg -O=attrs=l,p,genre -cfmin=2 # 226M ~ 0.18x ddc
##========================================
## times (+attrs, v0.03_0001, kern01.d): # T1 ~ REL1 (T2 ~ REL2)
$ ./dcdb-query.perl kern01.d Mann -ds=0 -null # 1.754s ~ 1.0x (0.217s ~ 1.00x)
$ ./dcdb-query.perl kern01.dlp Mann -ds=0 -null # 2.213s ~ 1.3x (0.222s ~ 1.02x)
$ ./dcdb-query.perl kern01.dlpg Mann -ds=0 -null # 5.090s ~ 2.9x (0.203s ~ 0.94x)