Download Jar. Libraryless. Click here for Pure Java version (2222L/15K).
1 | !7 |
2 | |
3 | p { |
4 | L<S> l = repF(f aGlobalID, 1000); |
5 | |
6 | int n = 1000; |
7 | repeat 10 { |
8 | time "String.intern" { |
9 | repeat n { for (S s : l) s.intern(); } |
10 | } |
11 | time "internPerProgram" { |
12 | repeat n { for (S s : l) internPerProgram(s); } |
13 | } |
14 | time "fastIntern" { |
15 | repeat n { for (S s : l) fastIntern(s); } |
16 | } |
17 | time "intern(S)" { |
18 | repeat n { for (S s : l) intern(s); } |
19 | } |
20 | } |
21 | |
22 | //printBenchResult(n); |
23 | } |
Began life as a copy of #1011712
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gjtlkbvenryc, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1011727 |
Snippet name: | Benchmark String.intern() vs internPerProgram vs fastIntern (VM-wide intern) vs intern (synonym of fastIntern) |
Eternal ID of this version: | #1011727/10 |
Text MD5: | 68ba6110bbb262a32e74e74d916619c4 |
Transpilation MD5: | 98264482dc546de2e6eeb367e5c7d0fc |
Author: | stefan |
Category: | javax |
Type: | JavaX source code (desktop) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2017-11-03 17:32:42 |
Source code size: | 451 bytes / 23 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 456 / 1151 |
Version history: | 9 change(s) |
Referenced in: | [show references] |