Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Results from running JMH tests on Amazon EC2 instance (c4.xlarge)
openjdk version "1.9.0-internal"
OpenJDK Runtime Environment (build 1.9.0-internal-root_2015_05_28_09_08-b00)
OpenJDK 64-Bit Server VM (build 1.9.0-internal-root_2015_05_28_09_08-b00, mixed mode)
# Run complete. Total time: 00:06:05
Benchmark (searchString) Mode Cnt Score Error Units
StringContainsMicrobenchmark.longStringContainsCharSequence cannabis avgt 10 1230.703 ? 2.519 ns/op
StringContainsMicrobenchmark.longStringContainsCharSequence xyz avgt 10 1172.886 ? 0.900 ns/op
StringContainsMicrobenchmark.longStringContainsCharSequence Cheesecake powder caramels cupcake tiramisu jelly avgt 10 1226.292 ? 2.004 ns/op
StringContainsMicrobenchmark.longStringContainsString cannabis avgt 10 1212.750 ? 5.782 ns/op
StringContainsMicrobenchmark.longStringContainsString xyz avgt 10 1166.014 ? 0.935 ns/op
StringContainsMicrobenchmark.longStringContainsString Cheesecake powder caramels cupcake tiramisu jelly avgt 10 1219.212 ? 1.304 ns/op
StringContainsMicrobenchmark.mediumStringContainsCharSequence cannabis avgt 10 512.444 ? 2.030 ns/op
StringContainsMicrobenchmark.mediumStringContainsCharSequence xyz avgt 10 494.647 ? 0.331 ns/op
StringContainsMicrobenchmark.mediumStringContainsCharSequence Cheesecake powder caramels cupcake tiramisu jelly avgt 10 482.487 ? 0.430 ns/op
StringContainsMicrobenchmark.mediumStringContainsString cannabis avgt 10 500.150 ? 0.273 ns/op
StringContainsMicrobenchmark.mediumStringContainsString xyz avgt 10 491.156 ? 0.260 ns/op
StringContainsMicrobenchmark.mediumStringContainsString Cheesecake powder caramels cupcake tiramisu jelly avgt 10 473.731 ? 0.261 ns/op
StringContainsMicrobenchmark.shortStringContainsCharSequence cannabis avgt 10 26.702 ? 0.281 ns/op
StringContainsMicrobenchmark.shortStringContainsCharSequence xyz avgt 10 29.504 ? 0.197 ns/op
StringContainsMicrobenchmark.shortStringContainsCharSequence Cheesecake powder caramels cupcake tiramisu jelly avgt 10 17.161 ? 0.268 ns/op
StringContainsMicrobenchmark.shortStringContainsString cannabis avgt 10 19.478 ? 0.134 ns/op
StringContainsMicrobenchmark.shortStringContainsString xyz avgt 10 22.587 ? 0.005 ns/op
StringContainsMicrobenchmark.shortStringContainsString Cheesecake powder caramels cupcake tiramisu jelly avgt 10 7.804 ? 0.481 ns/op
openjdk version "1.9.0-internal"
OpenJDK Runtime Environment (build 1.9.0-internal-root_2015_05_26_23_11-b00)
OpenJDK 64-Bit Server VM (build 1.9.0-internal-root_2015_05_26_23_11-b00, mixed mode)
# Run complete. Total time: 00:06:05
Benchmark (searchString) Mode Cnt Score Error Units
StringContainsMicrobenchmark.longStringContainsCharSequence cannabis avgt 10 2724.705 ? 28.718 ns/op
StringContainsMicrobenchmark.longStringContainsCharSequence xyz avgt 10 775.192 ? 5.960 ns/op
StringContainsMicrobenchmark.longStringContainsCharSequence Cheesecake powder caramels cupcake tiramisu jelly avgt 10 914.749 ? 2.238 ns/op
StringContainsMicrobenchmark.longStringContainsString cannabis avgt 10 1219.584 ? 9.927 ns/op
StringContainsMicrobenchmark.longStringContainsString xyz avgt 10 1168.084 ? 0.589 ns/op
StringContainsMicrobenchmark.longStringContainsString Cheesecake powder caramels cupcake tiramisu jelly avgt 10 1216.673 ? 1.268 ns/op
StringContainsMicrobenchmark.mediumStringContainsCharSequence cannabis avgt 10 1119.191 ? 13.471 ns/op
StringContainsMicrobenchmark.mediumStringContainsCharSequence xyz avgt 10 329.909 ? 0.267 ns/op
StringContainsMicrobenchmark.mediumStringContainsCharSequence Cheesecake powder caramels cupcake tiramisu jelly avgt 10 384.387 ? 0.605 ns/op
StringContainsMicrobenchmark.mediumStringContainsString cannabis avgt 10 500.944 ? 0.563 ns/op
StringContainsMicrobenchmark.mediumStringContainsString xyz avgt 10 487.027 ? 0.362 ns/op
StringContainsMicrobenchmark.mediumStringContainsString Cheesecake powder caramels cupcake tiramisu jelly avgt 10 472.934 ? 0.178 ns/op
StringContainsMicrobenchmark.shortStringContainsCharSequence cannabis avgt 10 32.370 ? 0.052 ns/op
StringContainsMicrobenchmark.shortStringContainsCharSequence xyz avgt 10 19.229 ? 0.015 ns/op
StringContainsMicrobenchmark.shortStringContainsCharSequence Cheesecake powder caramels cupcake tiramisu jelly avgt 10 10.121 ? 0.016 ns/op
StringContainsMicrobenchmark.shortStringContainsString cannabis avgt 10 19.515 ? 0.168 ns/op
StringContainsMicrobenchmark.shortStringContainsString xyz avgt 10 22.585 ? 0.004 ns/op
StringContainsMicrobenchmark.shortStringContainsString Cheesecake powder caramels cupcake tiramisu jelly avgt 10 7.568 ? 0.478 ns/op
java version "1.8.0_40"
Java(TM) SE Runtime Environment (build 1.8.0_40-b25)
Java HotSpot(TM) 64-Bit Server VM (build 25.40-b25, mixed mode)
# Run complete. Total time: 00:06:04
Benchmark (searchString) Mode Cnt Score Error Units
StringContainsMicrobenchmark.longStringContainsCharSequence cannabis avgt 10 1226.807 ? 4.292 ns/op
StringContainsMicrobenchmark.longStringContainsCharSequence xyz avgt 10 1174.476 ? 1.110 ns/op
StringContainsMicrobenchmark.longStringContainsCharSequence Cheesecake powder caramels cupcake tiramisu jelly avgt 10 1229.643 ? 6.297 ns/op
StringContainsMicrobenchmark.longStringContainsString cannabis avgt 10 1219.817 ? 5.042 ns/op
StringContainsMicrobenchmark.longStringContainsString xyz avgt 10 1165.715 ? 0.103 ns/op
StringContainsMicrobenchmark.longStringContainsString Cheesecake powder caramels cupcake tiramisu jelly avgt 10 1215.850 ? 1.438 ns/op
StringContainsMicrobenchmark.mediumStringContainsCharSequence cannabis avgt 10 508.909 ? 2.039 ns/op
StringContainsMicrobenchmark.mediumStringContainsCharSequence xyz avgt 10 499.116 ? 0.250 ns/op
StringContainsMicrobenchmark.mediumStringContainsCharSequence Cheesecake powder caramels cupcake tiramisu jelly avgt 10 483.382 ? 0.761 ns/op
StringContainsMicrobenchmark.mediumStringContainsString cannabis avgt 10 500.080 ? 0.312 ns/op
StringContainsMicrobenchmark.mediumStringContainsString xyz avgt 10 491.500 ? 0.284 ns/op
StringContainsMicrobenchmark.mediumStringContainsString Cheesecake powder caramels cupcake tiramisu jelly avgt 10 473.744 ? 0.193 ns/op
StringContainsMicrobenchmark.shortStringContainsCharSequence cannabis avgt 10 26.605 ? 0.077 ns/op
StringContainsMicrobenchmark.shortStringContainsCharSequence xyz avgt 10 29.127 ? 0.051 ns/op
StringContainsMicrobenchmark.shortStringContainsCharSequence Cheesecake powder caramels cupcake tiramisu jelly avgt 10 16.726 ? 0.022 ns/op
StringContainsMicrobenchmark.shortStringContainsString cannabis avgt 10 19.449 ? 0.003 ns/op
StringContainsMicrobenchmark.shortStringContainsString xyz avgt 10 22.586 ? 0.003 ns/op
StringContainsMicrobenchmark.shortStringContainsString Cheesecake powder caramels cupcake tiramisu jelly avgt 10 7.441 ? 0.033 ns/op
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment