Mryange opened a new pull request, #62243: URL: https://github.com/apache/doris/pull/62243
### What problem does this PR solve?
Benchmark results show that `FixedContainer` (SIMD linear scan) is slower
than `DynamicContainer` (hash set) for `std::string`/`StringRef` when N >= 2.
The FixedContainer optimization only benefits integer types at small sizes, but
hurts string lookups due to expensive comparisons scaling linearly with N.
This PR removes the `FixedContainer` specialization from
`create_string_value_set`, always using the hash-based `DynamicContainer`
instead.
Additionally fixes deprecated `DoNotOptimize` warnings in benchmark files
and adds a new `FixedContainer` vs `DynamicContainer` benchmark.
```
Fixed_Int32_N1
5.28 us 5.25 us 100000
Dynamic_Int32_N1
29.4 us 29.1 us 23538
Fixed_Int32_N2
15.7 us 15.6 us 46383
Dynamic_Int32_N2
41.4 us 41.2 us 16213
Fixed_Int32_N3
25.7 us 25.6 us 27386
Dynamic_Int32_N3
45.9 us 45.5 us 14574
Fixed_Int32_N4
9.45 us 9.40 us 79614
Dynamic_Int32_N4
40.5 us 40.3 us 15873
Fixed_Int32_N5
22.9 us 22.8 us 29587
Dynamic_Int32_N5
46.5 us 46.3 us 14624
Fixed_Int32_N6
31.5 us 31.3 us 22306
Dynamic_Int32_N6
46.5 us 46.3 us 14851
Fixed_Int32_N7
41.6 us 41.4 us 17142
Dynamic_Int32_N7
56.1 us 55.8 us 12542
Fixed_Int32_N8
11.1 us 11.1 us 70730
Dynamic_Int32_N8
43.3 us 42.1 us 12838
Fixed_Int64_N1
5.91 us 5.88 us 121146
Dynamic_Int64_N1
41.5 us 41.3 us 19183
Fixed_Int64_N2
16.0 us 16.0 us 47690
Dynamic_Int64_N2
40.2 us 40.0 us 18290
Fixed_Int64_N3
27.0 us 26.9 us 27097
Dynamic_Int64_N3
46.9 us 46.6 us 15495
Fixed_Int64_N4
24.8 us 24.6 us 28495
Dynamic_Int64_N4
40.5 us 40.2 us 17581
Fixed_Int64_N5
39.9 us 39.6 us 18133
Dynamic_Int64_N5
47.4 us 47.2 us 14943
Fixed_Int64_N6
45.8 us 45.5 us 15396
Dynamic_Int64_N6
49.2 us 48.9 us 14062
Fixed_Int64_N7
55.0 us 54.8 us 12726
Dynamic_Int64_N7
57.6 us 57.3 us 12673
Fixed_Int64_N8
14.5 us 14.4 us 48230
Dynamic_Int64_N8
40.3 us 40.1 us 17560
Fixed_String_N1
243 us 242 us 2884
Dynamic_String_N1
1364 us 1358 us 516
Fixed_String_N2
1195 us 1189 us 591
Dynamic_String_N2
739 us 736 us 946
Fixed_String_N3
163 us 163 us 4433
Dynamic_String_N3
226 us 225 us 3257
Fixed_String_N4
214 us 213 us 3290
Dynamic_String_N4
205 us 204 us 3437
Fixed_String_N5
266 us 265 us 2634
Dynamic_String_N5
220 us 219 us 2900
Fixed_String_N6
313 us 312 us 2246
Dynamic_String_N6
220 us 219 us 3195
Fixed_String_N7
362 us 360 us 1962
Dynamic_String_N7
234 us 233 us 3008
Fixed_String_N8
2586 us 2575 us 274
Dynamic_String_N8
213 us 212 us 3350
```
### Release note
None
### Check List (For Author)
- Test <!-- At least one of them must be included. -->
- [ ] Regression test
- [ ] Unit Test
- [ ] Manual test (add detailed scripts or steps below)
- [ ] No need to test or manual test. Explain why:
- [ ] This is a refactor/code format and no logic has been changed.
- [ ] Previous test can cover this change.
- [ ] No code files have been changed.
- [ ] Other reason <!-- Add your reason? -->
- Behavior changed:
- [ ] No.
- [ ] Yes. <!-- Explain the behavior change -->
- Does this need documentation?
- [ ] No.
- [ ] Yes. <!-- Add document PR link here. eg:
https://github.com/apache/doris-website/pull/1214 -->
### Check List (For Reviewer who merge this PR)
- [ ] Confirm the release note
- [ ] Confirm test cases
- [ ] Confirm document
- [ ] Add branch pick label <!-- Add branch pick label that this PR should
merge into -->
--
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]
