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

36
LINES

< > BotCompany Repo | #1005590 // Benchmark (+test) structure/unstructure with MANY custom objects

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

Libraryless. Click here for Pure Java version (3392L/21K/74K).

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  
  print("Objects: " + l(l));
24  
  structure_showTiming = true;
25  
  
26  
  for i to 8: { // give Server VM time to optimize
27  
    S s = testStructureFunction(l);
28  
    /*print("javaTok_streaming");
29  
    time {
30  
      javaTok_streaming(s, new JavaTok_Stream { void add(int i, int j) {} });
31  
    }*/
32  
    print("\n==\n");
33  
  }
34  
  
35  
  print("OK");
36  
}

Author comment

Began life as a copy of #1005589

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1005590
Snippet name: Benchmark (+test) structure/unstructure with MANY custom objects
Eternal ID of this version: #1005590/2
Text MD5: e6345a3a15a0195b879d34b06ea71747
Transpilation MD5: 5130e61066635042e11c27e4e73b88f5
Author: stefan
Category: javax
Type: JavaX source code
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-08-01 19:29:58
Source code size: 591 bytes / 36 lines
Pitched / IR pitched: No / No
Views / Downloads: 550 / 790
Version history: 1 change(s)
Referenced in: [show references]