Libraryless. Click here for Pure Java version (3212L/20K/71K).
1 | !7 |
2 | |
3 | sclass A { |
4 | A prev, next; |
5 | } |
6 | |
7 | static int n = 100000; |
8 | |
9 | p { |
10 | new L l; |
11 | A a = new A; |
12 | for (int i = 0; i < n; i++) { |
13 | A b = new A; |
14 | b.prev = a; |
15 | a.next = b; |
16 | a = b; |
17 | } |
18 | structure_showTiming = true; |
19 | |
20 | for i to 8: { // give Server VM time to optimize |
21 | S s = testStructureFunction(a, false); |
22 | print("\n==\n"); |
23 | } |
24 | |
25 | print("OK"); |
26 | } |
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: | 578 / 711 |
Version history: | 1 change(s) |
Referenced in: | [show references] |