1 | static Method fastIntern_method; |
2 | |
3 | static S fastIntern(S s) ctex { |
4 | if (s == null) null; |
5 | if (fastIntern_method == null) { |
6 | fastIntern_method = findMethodNamed(javax(), 'internPerProgram); |
7 | if (fastIntern_method == null) upgradeJavaXAndRestart(); |
8 | } |
9 | |
10 | ret (S) fastIntern_method.invoke(null, s); |
11 | } |
Began life as a copy of #1011692
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1011729 |
Snippet name: | fastIntern - VM-wide intern - faster alternative to String.intern() |
Eternal ID of this version: | #1011729/4 |
Text MD5: | 139f5b91e8974262598dbe99f5fc4e77 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2017-11-03 17:30:07 |
Source code size: | 319 bytes / 11 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 516 / 547 |
Version history: | 3 change(s) |
Referenced in: | [show references] |