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

13
LINES

< > BotCompany Repo | #1011484 // Benchmark hugeEnglishDictionary().contains() - less than 4µs :)

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

Download Jar. Libraryless. Click here for Pure Java version (4863L/31K).

1  
!7
2  
3  
p {
4  
  L<S> l = hugeEnglishDictionary();
5  
  S a = aGlobalID(), b = aGlobalID();
6  
  twice { time {
7  
    repeat 1000000 {
8  
      assertFalse(l.contains(a));
9  
      assertFalse(l.contains(b));
10  
    }
11  
  }}
12  
  printBenchResult(1000000);
13  
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1011484
Snippet name: Benchmark hugeEnglishDictionary().contains() - less than 4µs :)
Eternal ID of this version: #1011484/3
Text MD5: 6652cf6e4d79f0420ef7c86d56b963e6
Transpilation MD5: ffb0ab132b2f834301558ab5e8521ea8
Author: stefan
Category: javax
Type: JavaX source code (desktop)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-10-30 02:48:05
Source code size: 241 bytes / 13 lines
Pitched / IR pitched: No / No
Views / Downloads: 627 / 1451
Version history: 2 change(s)
Referenced in: [show references]