Download Jar. Libraryless. Click here for Pure Java version (1540L/10K).
1 | !7 |
2 | |
3 | static int n = 100000; |
4 | |
5 | p {
|
6 | File there = saveTextFile(prepareProgramFile("there.txt"), "hello");
|
7 | File notThere = prepareProgramFile("notthere.txt");
|
8 | |
9 | print("n = " + n);
|
10 | |
11 | time "there" {
|
12 | repeat n { loadTextFile(there); }
|
13 | } |
14 | printTimingDividedBy(n); |
15 | |
16 | time "not there" {
|
17 | repeat n { loadTextFile(notThere); }
|
18 | } |
19 | printTimingDividedBy(n); |
20 | } |
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: | #1010029 |
| Snippet name: | Benchmark loading small text file [gives .04 ms and .004 ms for me] |
| Eternal ID of this version: | #1010029/3 |
| Text MD5: | f3e3bd29f0528c2027dbe22eabff9da8 |
| Transpilation MD5: | 9a00cf66a9b89b528a4e7f0e35685fcc |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX source code (desktop) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2017-08-29 16:52:04 |
| Source code size: | 386 bytes / 20 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 896 / 2137 |
| Version history: | 2 change(s) |
| Referenced in: | [show references] |