Libraryless. Click here for Pure Java version (4867L/31K/106K).
1 | !7 |
2 | |
3 | sclass A { |
4 | int a; |
5 | |
6 | [stdEq] |
7 | } |
8 | |
9 | sclass B extends A { |
10 | int 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 := 1)); |
21 | l.add(nu(B, a := 2, b := 3)); |
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 | } |
Began life as a copy of #1005590
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1009440 |
Snippet name: | Benchmark (+test) structure/unstructure with MANY custom objects containing primitive values |
Eternal ID of this version: | #1009440/3 |
Text MD5: | 314a7e5e3e85506470ffa06a2bbbdaaa |
Transpilation MD5: | be7ce9e374ad74252884cf95d7ef6ee6 |
Author: | stefan |
Category: | javax |
Type: | JavaX source code |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-10-05 13:19:00 |
Source code size: | 581 bytes / 36 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 481 / 613 |
Version history: | 2 change(s) |
Referenced in: | [show references] |