I was a bit skeptical at first, especially bc. of the rational (disseminating equals method), since HotSpot actually has an intrinsic for String.equals, but my own benchmarks confirm these results. I tried Oracle Java 8 on Ubuntu WSL (Win 10) and AdoptOpenJdk 11 on Win 10. I also added one test case “nullAndPreEquals” which is equal to org.springframework.util.StringUtils.isEmpty (namely (str == null || "".equals(str))` ): Oracle Java 8 (on WSL): Benchmark (strParams) Mode Cnt Score Error Units EmptyStringEquals.equalsPost avgt 20 4.193 ± 0.095 ns/op EmptyStringEquals.equalsPost nonEmptyString avgt 20 3.255 ± 0.034 ns/op EmptyStringEquals.nonNullAndIsEmpty avgt 20 2.823 ± 0.176 ns/op EmptyStringEquals.nonNullAndIsEmpty nonEmptyString avgt 20 2.690 ± 0.128 ns/op EmptyStringEquals.nullAndPreEquals avgt 20 3.886 ± 0.063 ns/op EmptyStringEquals.nullAndPreEquals nonEmptyString avgt 20 3.260 ± 0.041 ns/op EmptyStringEquals.preEquals avgt 20 3.874 ± 0.077 ns/op EmptyStringEquals.preEquals nonEmptyString avgt 20 3.287 ± 0.060 ns/op AdoptOpenJdk 11 (HotSpot) (on Windows 10): Benchmark (strParams) Mode Cnt Score Error Units EmptyStringEquals.equalsPost avgt 20 4,837 ± 0,076 ns/op EmptyStringEquals.equalsPost nonEmptyString avgt 20 3,880 ± 0,069 ns/op EmptyStringEquals.nonNullAndIsEmpty avgt 20 3,020 ± 0,048 ns/op EmptyStringEquals.nonNullAndIsEmpty nonEmptyString avgt 20 3,202 ± 0,095 ns/op EmptyStringEquals.nullAndPreEquals avgt 20 4,813 ± 0,120 ns/op EmptyStringEquals.nullAndPreEquals nonEmptyString avgt 20 3,988 ± 0,197 ns/op EmptyStringEquals.preEquals avgt 20 4,828 ± 0,093 ns/op EmptyStringEquals.preEquals nonEmptyString avgt 20 3,949 ± 0,072 ns/op |