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

26
LINES

< > BotCompany Repo | #1005657 // Benchmark (+test) structure/unstructure with LONG doubly-linked list

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

Libraryless. Click here for Pure Java version (3212L/20K/71K).

!7

sclass A {
  A prev, next;
}

static int n = 100000;

p {
  new L l;
  A a = new A;
  for (int i = 0; i < n; i++) {
    A b = new A;
    b.prev = a;
    a.next = b;
    a = b;
  }
  structure_showTiming = true;
  
  for i to 8: { // give Server VM time to optimize
    S s = testStructureFunction(a, false);
    print("\n==\n");
  }
  
  print("OK");
}

Author comment

Began life as a copy of #1005590

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1005657
Snippet name: Benchmark (+test) structure/unstructure with LONG doubly-linked list
Eternal ID of this version: #1005657/2
Text MD5: 199d9ef24269234bf58caf4b22ba76e8
Transpilation MD5: 3f7f29adf80f29a7cfe33aa1db81aa00
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:04:46
Source code size: 381 bytes / 26 lines
Pitched / IR pitched: No / No
Views / Downloads: 509 / 630
Version history: 1 change(s)
Referenced in: [show references]