This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
JDK 11.0.8, OpenJDK 64-Bit Server VM, 11.0.8+10 | |
``` | |
Benchmark Mode Cnt Score Error Units | |
EnumValueOf.enumMap avgt 50 7.800 ± 0.097 ns/op | |
EnumValueOf.enumSwitch avgt 50 19.734 ± 0.350 ns/op | |
EnumValueOf.enumValueOf avgt 50 9.292 ± 0.826 ns/op | |
``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@BenchmarkMode(Mode.AverageTime) | |
@Fork(5) | |
@State(Scope.Thread) | |
@Warmup(iterations = 5, time = 1) | |
@OutputTimeUnit(TimeUnit.NANOSECONDS) | |
@Measurement(iterations = 10, time = 1) | |
public class EnumValueOf { | |
String[] names; | |
int index; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
JDK 11.0.8, OpenJDK 64-Bit Server VM, 11.0.8+10 | |
``` | |
Benchmark (value) Mode Cnt Score Error Units | |
RemoveChar.remove avgt 10 4.405 ± 1.646 ns/op | |
RemoveChar.remove somePathNoDoT avgt 10 7.820 ± 0.296 ns/op | |
RemoveChar.remove some.Path.With.Dot avgt 10 92.185 ± 3.752 ns/op | |
RemoveChar.removeApache avgt 10 3.708 ± 0.070 ns/op | |
RemoveChar.removeApache somePathNoDoT avgt 10 10.018 ± 0.103 ns/op |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@BenchmarkMode(Mode.AverageTime) | |
@Fork(1) | |
@State(Scope.Thread) | |
@Warmup(iterations = 5, time = 1) | |
@OutputTimeUnit(TimeUnit.NANOSECONDS) | |
@Measurement(iterations = 10, time = 1) | |
public class RemoveChar { | |
@Param({"", "somePathNoDoT", "some.Path.With.Dot"}) | |
String value; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
JDK 11.0.8, OpenJDK 64-Bit Server VM, 11.0.8+10 | |
``` | |
Benchmark (value) Mode Cnt Score Error Units | |
ReplaceCustom.replace avgt 10 4.497 ± 1.085 ns/op | |
ReplaceCustom.replace somePathNoDoT avgt 10 7.944 ± 0.289 ns/op | |
ReplaceCustom.replace some.Path.With.Dot avgt 10 106.270 ± 5.095 ns/op | |
ReplaceCustom.replaceChar avgt 10 3.689 ± 0.040 ns/op | |
ReplaceCustom.replaceChar somePathNoDoT avgt 10 8.787 ± 0.119 ns/op |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
JDK 11.0.8, OpenJDK 64-Bit Server VM, 11.0.8+10 | |
``` | |
Benchmark (value) Mode Cnt Score Error Units | |
ReplaceCustom.replace avgt 10 4.497 ± 1.085 ns/op | |
ReplaceCustom.replace somePathNoDoT avgt 10 7.944 ± 0.289 ns/op | |
ReplaceCustom.replace some.Path.With.Dot avgt 10 106.270 ± 5.095 ns/op | |
ReplaceCustom.replaceApache avgt 10 3.784 ± 0.065 ns/op | |
ReplaceCustom.replaceApache somePathNoDoT avgt 10 8.168 ± 0.052 ns/op |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@BenchmarkMode(Mode.AverageTime) | |
@Fork(1) | |
@State(Scope.Thread) | |
@Warmup(iterations = 5, time = 1) | |
@OutputTimeUnit(TimeUnit.NANOSECONDS) | |
@Measurement(iterations = 10, time = 1) | |
public class ReplaceCustom { | |
@Param({"", "somePathNoDoT", "some.Path.With.Dot"}) | |
String value; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
JDK 11.0.8, OpenJDK 64-Bit Server VM, 11.0.8+10 | |
``` | |
Benchmark (value) Mode Cnt Score Error Units | |
replace avgt 10 3.843 ± 0.100 ns/op | |
replace somePathNoDoT avgt 10 8.693 ± 0.693 ns/op | |
replace some.Path.With.Dot avgt 10 127.022 ± 8.842 ns/op | |
replaceAll avgt 10 156.550 ± 10.741 ns/op | |
replaceAll somePathNoDoT avgt 10 159.619 ± 4.654 ns/op |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@BenchmarkMode(Mode.AverageTime) | |
@Fork(1) | |
@State(Scope.Thread) | |
@Warmup(iterations = 5, time = 1) | |
@OutputTimeUnit(TimeUnit.NANOSECONDS) | |
@Measurement(iterations = 10, time = 1) | |
public class ReplaceAllPrecompiled { | |
@Param({"", "somePathNoDoT", "some.Path.With.Dot"}) | |
String value; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
JDK 11.0.8, OpenJDK 64-Bit Server VM, 11.0.8+10 | |
``` | |
Benchmark (value) Mode Cnt Score Error Units | |
ReplaceAll.replace avgt 10 3.836 ± 0.060 ns/op | |
ReplaceAll.replaceAll avgt 10 147.857 ± 1.550 ns/op | |
ReplaceAll.replaceAllWithContains avgt 10 3.777 ± 0.069 ns/op | |
ReplaceAll.replaceWithContains avgt 10 3.778 ± 0.075 ns/op | |
ReplaceAll.replace somePathNoDoT avgt 10 7.647 ± 0.646 ns/op |
NewerOlder