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

37
LINES

< > BotCompany Repo | #1005605 // Benchmark using unstructure a lot, exit VM (for profiling)

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

Libraryless. Click here for Pure Java version (2611L/16K/54K).

1  
!752
2  
3  
sclass A {
4  
  S a;
5  
  
6  
  [stdEq]
7  
}
8  
9  
sclass B extends A {
10  
  S b;
11  
  
12  
  [stdEq]
13  
}
14  
15  
static int n = 200000;
16  
17  
p {
18  
  new L l;
19  
  for (int i = 0; i < n; i++) {
20  
    l.add(nu(A, a := "AAA"));
21  
    l.add(nu(B, a := "ABC", b := "DEF"));
22  
  }
23  
  structure_showTiming = true;
24  
  S s = structure(l);
25  
  print("Have " + l(s) + " chars (" + n*2 + " objects)");
26  
  l = null;
27  
  
28  
  for i to 6: { // give Server VM time to optimize
29  
    time {
30  
      unstructure(s);
31  
    }
32  
    print("\n==\n");
33  
  }
34  
  
35  
  print("OK");
36  
  killVM();
37  
}

Author comment

Began life as a copy of #1005590

download  show line numbers  debug dex  old transpilations   

Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1005605
Snippet name: Benchmark using unstructure a lot, exit VM (for profiling)
Eternal ID of this version: #1005605/1
Text MD5: ebbb48d9ab4d37fe67fe781737bae63b
Transpilation MD5: 5bfe35892d4164ac43eedf09440586cf
Author: stefan
Category: javax
Type: JavaX source code
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2016-11-29 16:36:20
Source code size: 539 bytes / 37 lines
Pitched / IR pitched: No / No
Views / Downloads: 443 / 512
Referenced in: [show references]