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

21
LINES

< > BotCompany Repo | #1011708 // Benchmark setOpt (74 ns)

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

Download Jar. Libraryless. Click here for Pure Java version (1013L/7K).

1  
!7
2  
3  
sclass MyClass {
4  
  S a, b, c, d, e, f;
5  
}
6  
7  
sclass MyOtherClass {}
8  
9  
static volatile new MyClass c;
10  
11  
p {
12  
  setOpt(new MyOtherClass, 'a, 0); // just to fill setOpt's cache
13  
  
14  
  int n = tenMillion();
15  
  repeat 10 { time {
16  
    repeat n {
17  
      setOpt(c, 'e, "hello");
18  
    }
19  
  }}
20  
  printBenchResult(n);
21  
}

Author comment

Began life as a copy of #1011706

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1011708
Snippet name: Benchmark setOpt (74 ns)
Eternal ID of this version: #1011708/9
Text MD5: 7f59543cf09857829ef7645ba6ed9faf
Transpilation MD5: 2185b7109cec905482ab84553ed56cb9
Author: stefan
Category: javax
Type: JavaX source code (desktop)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-11-02 19:06:05
Source code size: 320 bytes / 21 lines
Pitched / IR pitched: No / No
Views / Downloads: 402 / 907
Version history: 8 change(s)
Referenced in: [show references]