Libraryless. Click here for Pure Java version (929L/7K/22K).
1 | !7 |
2 | |
3 | static final long rep = 10000000; |
4 | |
5 | p { |
6 | // check sanity |
7 | byte[] data = toUtf8("hallö"); |
8 | assertEquals(fastu_fromUtf8(data), fromUtf8(data)); |
9 | |
10 | repeat 100 { |
11 | time { repeat rep { fromUtf8(data); } } |
12 | print(iterationsPerSecond(rep) + " fromUtf8's/s"); |
13 | |
14 | time { repeat rep { fastu_fromUtf8(data); } } |
15 | print(iterationsPerSecond(rep) + " fastu_fromUtf8's/s"); |
16 | } |
17 | } |
Began life as a copy of #1005594
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, jtubtzbbkimh, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1009204 |
Snippet name: | Benchmark fastu_fromUtf8 vs fromUtf8 - yes it's faster |
Eternal ID of this version: | #1009204/5 |
Text MD5: | 3cac6159807f694d264ada959c532cb4 |
Transpilation MD5: | 2773e5c2f5e9bf7c101a07d2a07809e1 |
Author: | stefan |
Category: | javax |
Type: | JavaX source code |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2017-10-30 01:43:16 |
Source code size: | 399 bytes / 17 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 465 / 591 |
Version history: | 4 change(s) |
Referenced in: | [show references] |