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

12
LINES

< > BotCompany Repo | #1011705 // Benchmark isTrue(ThreadLocal)

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

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

1  
!7
2  
3  
static new ThreadLocal<Bool> b;
4  
5  
p {
6  
  twice { time {
7  
    repeat 10000000 {
8  
      if (isTrue(b!)) sleep(10);
9  
    }
10  
  }}
11  
  printBenchResult(10000000);
12  
}

Author comment

Began life as a copy of #1011704

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1011705
Snippet name: Benchmark isTrue(ThreadLocal)
Eternal ID of this version: #1011705/1
Text MD5: c9bc320d1df7036ce43dda00e271aa26
Transpilation MD5: 5555aa3659a3b09b24d16a45cd02fde6
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 08:10:12
Source code size: 166 bytes / 12 lines
Pitched / IR pitched: No / No
Views / Downloads: 379 / 777
Referenced in: [show references]