Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

29
LINES

< > BotCompany Repo | #1028524 // Benchmark LineComp v3 [dev.]

JavaX source code (desktop) [tags: use-pretranspiled] - run with: x30.jar

Download Jar. Uses 11335K of libraries. Click here for Pure Java version (8652L/57K).

1  
!7
2  
3  
// Typical results: Can do ? characters with -Xmx12G
4  
// ~? us per character
5  
6  
!include once #1028523 // LineComp_PairIndex, new version
7  
8  
set flag LineComp_SingleChain.
9  
10  
p {
11  
  noRegularGC();
12  
  twice { print(); go(args); }
13  
}
14  
15  
svoid go(S[] args) {
16  
  int n = parseIntOr(first(args), 1);
17  
  int max = parseIntOr(second(args), 100*oneMillion());
18  
  for (; n <= max; n += (n >= tenMillion() ? tenMillion() : n)) {
19  
    consoleStatus("n=" + n);
20  
    Random random = repeatableRandomizer();
21  
    S input = stringFromRepF(() -> charPlus('a', randomInt(random, 3)), n);
22  
    long time = sysNow();
23  
    new LineCompCompressor compressor;
24  
    compressor.verboseStats = true;
25  
    LineCompedSingle<Char> lc = lineComp_compressTextAsChars(compressor, input);
26  
    time = sysNow()-time;
27  
    printBenchResult("complexity: " + lcRoughComplexity(lc), time, n);
28  
  }
29  
}

Author comment

Began life as a copy of #1028520

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: #1028524
Snippet name: Benchmark LineComp v3 [dev.]
Eternal ID of this version: #1028524/1
Text MD5: 4d9e9f729fa3bee27855bfa4616ff72a
Transpilation MD5: b5b495b469999ecd0e74d8025415df4a
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 01:58:41
Source code size: 869 bytes / 29 lines
Pitched / IR pitched: No / No
Views / Downloads: 169 / 671
Referenced in: [show references]