richardstartin edited a comment on pull request #7468:
URL: https://github.com/apache/pinot/pull/7468#issuecomment-925311763
Just in case the `String` change is contentious, this will definitely not
cause a performance regression:
```java
@State(Scope.Benchmark)
public class StringEmptyBenchmark {
@Param({"", "not empty"})
String string;
@Benchmark
public boolean isEmpty() {
return string.isEmpty();
}
@Benchmark
public boolean equalsEmpty() {
return "".equals(string);
}
}
```
```
Benchmark (string) Mode Cnt Score Error Units
StringEmptyBenchmark.equalsEmpty avgt 5 3.720 ± 0.657 ns/op
StringEmptyBenchmark.equalsEmpty not empty avgt 5 2.671 ± 0.011 ns/op
StringEmptyBenchmark.isEmpty avgt 5 2.017 ± 0.016 ns/op
StringEmptyBenchmark.isEmpty not empty avgt 5 1.997 ± 0.009 ns/op
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]