forked from atkaper/contest-java-character-replacer
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample-run-java9.txt
More file actions
29 lines (28 loc) · 2.7 KB
/
Copy pathexample-run-java9.txt
File metadata and controls
29 lines (28 loc) · 2.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
Note: Contest.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Generated input (length: 22000000) in 249 ms.
Contender | Length | Hash | Timems | Notes
------------------------------------------------------------------------------------------------------------
(#1) Edwin-1, Map and Stream to StringBuilder | 22000000 | -1856184729 | 427ms |
(#2) Edwin-2, Map and For to StringBuilder | 22000000 | -1856184729 | 468ms |
(#3) Edwin-3, Map and For to StringBuffer | 22000000 | -1856184729 | 470ms |
(#4) Edwin-4, Parallel stream version | 22000000 | -1856184729 | 579ms |
(#5) Thijs-1, simple replace + to-upper | 22000000 | -1856184729 | 243ms |
(#6) Thijs-2, For with if/else to StringBuilder | 22000000 | -1856184729 | 220ms |
(#7) Thijs-3, For with switch/case to StringBuilder | 22000000 | -1856184729 | 229ms |
(#8) Thijs-4, For with if/else to byte array | 22000000 | -1856184729 | 141ms |
(#9) Armand-1, replace with look-ahead regex. | -1 | -1 | 0ms | Length mismatch. Hash-code mismatch.
(#10) Jan-1, dirty :) | 22000000 | -1856184729 | 173ms |
(#11) Jan-2, simple replace + no-upper | 22000000 | -1856184729 | 312ms |
(#12) Milo-1, parallel string replace | 22000000 | -1856184729 | 84ms |
(#13) Jan-3, Milo-1 + Jan-2, parallel string replace | 22000000 | -1856184729 | 123ms |
(#14) Jan-4, ForkJoinPool | 22000000 | -1856184729 | 50ms |
(#15) Milo-3, parallel char replace | 22000000 | -1856184729 | 35ms |
(#16) Jan-5, ForkJoinPool (direct write) | 22000000 | -1856184729 | 53ms |
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by Contest$17 (file:/home/thijs/src/contest-java-character-replacer/) to field java.lang.String.value
WARNING: Please consider reporting this to the maintainers of Contest$17
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
(#17) Milo-4, parallel char replace with direct access in String | 22000000 | -1856184729 | 34ms | Code did update immutable input string!
(#18) Thijs-5, simple replace + to-upper (half of them to-upper) | 22000000 | -1856184729 | 319ms |