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).

!7

p {
  L<S> l = hugeEnglishDictionary();
  S a = aGlobalID(), b = aGlobalID();
  twice { time {
    repeat 1000000 {
      assertFalse(l.contains(a));
      assertFalse(l.contains(b));
    }
  }}
  printBenchResult(1000000);
}

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: 467 / 1032
Version history: 2 change(s)
Referenced in: [show references]