clintropolis opened a new pull request, #14572:
URL: https://github.com/apache/druid/pull/14572
### Description
Cleans up `FrontCodedIndexed` a bit by making it abstract and splitting the
two versions into internal final static classes. Since the columns are not
using concrete classes anymore it seems harmless, and ran the benchmarks and it
looks like a light improvement over the last time I ran them in #13854
```
Benchmark (indexType) (numElements)
(numOperations) (width) Mode Cnt Score Error Units
FrontCodedIndexedBenchmark.get generic 10000
10000 16 avgt 5 15.236 ± 0.355 ns/op
FrontCodedIndexedBenchmark.get front-coded-v0-4 10000
10000 16 avgt 5 35.261 ± 0.440 ns/op
FrontCodedIndexedBenchmark.get front-coded-v0-16 10000
10000 16 avgt 5 48.307 ± 1.014 ns/op
FrontCodedIndexedBenchmark.get front-coded-v1-4 10000
10000 16 avgt 5 30.271 ± 0.492 ns/op
FrontCodedIndexedBenchmark.get front-coded-v1-16 10000
10000 16 avgt 5 60.148 ± 1.345 ns/op
FrontCodedIndexedBenchmark.indexOf generic 10000
10000 16 avgt 5 140.081 ± 1.598 ns/op
FrontCodedIndexedBenchmark.indexOf front-coded-v0-4 10000
10000 16 avgt 5 225.592 ± 5.382 ns/op
FrontCodedIndexedBenchmark.indexOf front-coded-v0-16 10000
10000 16 avgt 5 249.906 ± 2.288 ns/op
FrontCodedIndexedBenchmark.indexOf front-coded-v1-4 10000
10000 16 avgt 5 222.627 ± 2.915 ns/op
FrontCodedIndexedBenchmark.indexOf front-coded-v1-16 10000
10000 16 avgt 5 242.854 ± 3.662 ns/op
FrontCodedIndexedBenchmark.iterator generic 10000
10000 16 avgt 5 25.078 ± 0.090 ns/op
FrontCodedIndexedBenchmark.iterator front-coded-v0-4 10000
10000 16 avgt 5 175.460 ± 32.979 ns/op
FrontCodedIndexedBenchmark.iterator front-coded-v0-16 10000
10000 16 avgt 5 90.568 ± 4.316 ns/op
FrontCodedIndexedBenchmark.iterator front-coded-v1-4 10000
10000 16 avgt 5 90.785 ± 9.433 ns/op
FrontCodedIndexedBenchmark.iterator front-coded-v1-16 10000
10000 16 avgt 5 66.247 ± 3.353 ns/op
```
```
Benchmark (indexType) (numElements)
(numOperations) (width) Mode Cnt Score Error Units
FrontCodedIndexedBenchmark.get generic 100000
10000 16 avgt 5 16.870 ± 0.393 ns/op
FrontCodedIndexedBenchmark.get front-coded-v0-4 100000
10000 16 avgt 5 37.571 ± 0.747 ns/op
FrontCodedIndexedBenchmark.get front-coded-v0-16 100000
10000 16 avgt 5 52.603 ± 1.487 ns/op
FrontCodedIndexedBenchmark.get front-coded-v1-4 100000
10000 16 avgt 5 35.848 ± 1.598 ns/op
FrontCodedIndexedBenchmark.get front-coded-v1-16 100000
10000 16 avgt 5 66.785 ± 1.287 ns/op
FrontCodedIndexedBenchmark.indexOf generic 100000
10000 16 avgt 5 209.096 ± 3.119 ns/op
FrontCodedIndexedBenchmark.indexOf front-coded-v0-4 100000
10000 16 avgt 5 283.371 ± 3.187 ns/op
FrontCodedIndexedBenchmark.indexOf front-coded-v0-16 100000
10000 16 avgt 5 293.128 ± 1.280 ns/op
FrontCodedIndexedBenchmark.indexOf front-coded-v1-4 100000
10000 16 avgt 5 272.420 ± 3.830 ns/op
FrontCodedIndexedBenchmark.indexOf front-coded-v1-16 100000
10000 16 avgt 5 290.080 ± 51.628 ns/op
FrontCodedIndexedBenchmark.iterator generic 100000
10000 16 avgt 5 264.879 ± 1.862 ns/op
FrontCodedIndexedBenchmark.iterator front-coded-v0-4 100000
10000 16 avgt 5 1983.247 ± 148.264 ns/op
FrontCodedIndexedBenchmark.iterator front-coded-v0-16 100000
10000 16 avgt 5 910.984 ± 25.855 ns/op
FrontCodedIndexedBenchmark.iterator front-coded-v1-4 100000
10000 16 avgt 5 1092.562 ± 132.873 ns/op
FrontCodedIndexedBenchmark.iterator front-coded-v1-16 100000
10000 16 avgt 5 904.535 ± 118.432 ns/op
```
<hr>
This PR has:
- [ ] been self-reviewed.
- [ ] using the [concurrency
checklist](https://github.com/apache/druid/blob/master/dev/code-review/concurrency.md)
(Remove this item if the PR doesn't have any relation to concurrency.)
- [ ] added documentation for new or modified features or behaviors.
- [ ] a release note entry in the PR description.
- [ ] added Javadocs for most classes and all non-trivial methods. Linked
related entities via Javadoc links.
- [ ] added or updated version, license, or notice information in
[licenses.yaml](https://github.com/apache/druid/blob/master/dev/license.md)
- [ ] added comments explaining the "why" and the intent of the code
wherever would not be obvious for an unfamiliar reader.
- [ ] added unit tests or modified existing tests to cover new code paths,
ensuring the threshold for [code
coverage](https://github.com/apache/druid/blob/master/dev/code-review/code-coverage.md)
is met.
- [ ] added integration tests.
- [ ] been tested in a test Druid cluster.
--
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]