Download Jar. Libraryless. Click here for Pure Java version (7405L/53K).
1 | !7 |
2 | |
3 | p-exp { |
4 | int n = 200000, count = 0; |
5 | LS l = mL("Random facts"); |
6 | S s = "I am a *"; |
7 | parse3_cachedInput_cache = synchronizedMRUCache(100); |
8 | |
9 | twice { time { |
10 | count = 0; |
11 | repeat n { |
12 | for (S x : l) if (match3(s, x)) ++count; |
13 | } |
14 | }} |
15 | printBenchResult(n*l(l)); |
16 | print(count); |
17 | |
18 | for (S v : allCacheVars()) pcall-short { |
19 | print(v + ": " + l(getMC(v))); |
20 | } |
21 | } |
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1017783 |
Snippet name: | Bench match3() - now does 4M+ matches per second with big enough cache |
Eternal ID of this version: | #1017783/11 |
Text MD5: | 793fef6ff4a9fe12233e59c058c4c24a |
Transpilation MD5: | 8f9e0146977691a1bdb96a494a98c7a4 |
Author: | stefan |
Category: | javax / a.i. |
Type: | JavaX source code (desktop) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-08-11 14:09:07 |
Source code size: | 404 bytes / 21 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 420 / 941 |
Version history: | 10 change(s) |
Referenced in: | [show references] |