Download Jar. Uses 11335K of libraries. Click here for Pure Java version (8573L/57K).
1 | !7 |
2 | |
3 | // Typical results: Can do 80M characters with -Xmx12G |
4 | // ~8 us per character |
5 | |
6 | set flag LineComp_SingleChain. |
7 | |
8 | p { |
9 | noRegularGC(); |
10 | twice { print(); go(args); } |
11 | } |
12 | |
13 | svoid go(S[] args) { |
14 | int n = parseIntOr(first(args), 1); |
15 | int max = parseIntOr(second(args), 100*oneMillion()); |
16 | for (; n <= max; n += (n < tenMillion() ? tenMillion() : n)) { |
17 | consoleStatus("n=" + n); |
18 | Random random = repeatableRandomizer(); |
19 | S input = stringFromRepF(() -> charPlus('a', randomInt(random, 3)), n); |
20 | long time = sysNow(); |
21 | new LineCompCompressor compressor; |
22 | compressor.verboseStats = true; |
23 | LineCompedSingle<Char> lc = lineComp_compressTextAsChars(compressor, input); |
24 | time = sysNow()-time; |
25 | printBenchResult("complexity: " + lcRoughComplexity(lc), time, n); |
26 | } |
27 | } |
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: | #1028498 |
Snippet name: | Benchmark LineComp |
Eternal ID of this version: | #1028498/19 |
Text MD5: | d935a6e5cf8b1cc4de4bc12e5e51ef44 |
Transpilation MD5: | a3ccf751ff8039d3c46d7d0a0f1686f1 |
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-23 14:43:54 |
Source code size: | 809 bytes / 27 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 399 / 1427 |
Version history: | 18 change(s) |
Referenced in: | [show references] |