Download Jar. Uses 11335K of libraries. Click here for Pure Java version (8621L/57K).
1 | !7 |
2 | |
3 | // Typical results: Would be able to do 100M characters with -Xmx12G if it wasn't for the final decoding step... |
4 | // So 95M should probably work. |
5 | // ~5-7 us per character |
6 | |
7 | !include once #1028521 // LineComp_PairIndex, new version |
8 | |
9 | set flag LineComp_SingleChain. |
10 | |
11 | p { |
12 | noRegularGC(); |
13 | twice { print(); go(args); } |
14 | } |
15 | |
16 | svoid go(S[] args) { |
17 | int n = parseIntOr(first(args), 1); |
18 | int max = parseIntOr(second(args), 100*oneMillion()); |
19 | for (; n <= max; n += (n >= tenMillion() ? tenMillion() : n)) { |
20 | consoleStatus("n=" + n); |
21 | Random random = repeatableRandomizer(); |
22 | S input = stringFromRepF(() -> charPlus('a', randomInt(random, 3)), n); |
23 | long time = sysNow(); |
24 | new LineCompCompressor compressor; |
25 | compressor.verboseStats = true; |
26 | LineCompedSingle<Char> lc = lineComp_compressTextAsChars(compressor, input); |
27 | time = sysNow()-time; |
28 | printBenchResult("complexity: " + lcRoughComplexity(lc), time, n); |
29 | } |
30 | } |
Began life as a copy of #1028498
download show line numbers debug dex old transpilations
Travelled to 7 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv
No comments. add comment
Snippet ID: | #1028520 |
Snippet name: | Benchmark LineComp v2 [OK, compact and fast!] |
Eternal ID of this version: | #1028520/8 |
Text MD5: | cbccaed1f864753405ff947f4de21951 |
Transpilation MD5: | 1095e1249709ec2ce2b3dd590f31eca2 |
Author: | stefan |
Category: | javax / linecomp compression |
Type: | JavaX source code (desktop) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2020-06-24 03:17:34 |
Source code size: | 964 bytes / 30 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 349 / 1092 |
Version history: | 7 change(s) |
Referenced in: | [show references] |