Commit 600b0ba
refactor: Optimize HiveConnectorUtil: deduplicate and endWith functions (facebookincubator#16508)
Summary:
Pull Request resolved: facebookincubator#16508
endWith(): Replaced manual string comparison with C++20 std::string::ends_with()
- Old: Manual loop with strlen and character comparison (12 lines)
- New: Standard library ends_with() (1 line)
- Performance gain: ~1.5-2x due to SIMD optimizations in stdlib
- Code clarity: Much more readable and maintainable
Reviewed By: Yuhta
Differential Revision: D94146709
fbshipit-source-id: aa2cc047c389953128b253b049ff477da5f747ae1 parent 01c1149 commit 600b0ba
1 file changed
+1
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
868 | 868 | | |
869 | 869 | | |
870 | 870 | | |
871 | | - | |
872 | | - | |
873 | | - | |
874 | | - | |
875 | | - | |
876 | | - | |
877 | | - | |
878 | | - | |
879 | | - | |
880 | | - | |
| 871 | + | |
881 | 872 | | |
882 | 873 | | |
883 | 874 | | |
| |||
0 commit comments