sql-parser icon indicating copy to clipboard operation
sql-parser copied to clipboard

Use character array for utfstring

Open MoonE opened this issue 1 year ago • 1 comments

Benchmarks indicate a nice performance gain, too.

Old:

benchmark subject set revs its mem_peak mode rstdev
UtfStringBench benchBuildUtfString 4 20 1.910mb 34.245ms ±1.33%
UtfStringBench benchUtfStringRandomAccessWithUnicode 4 20 1.910mb 78.063μs ±9.44%

New:

benchmark subject set revs its mem_peak mode rstdev
UtfStringBench benchBuildUtfString 4 20 2.513mb 14.636ms ±2.37%
UtfStringBench benchUtfStringRandomAccessWithUnicode 4 20 1.910mb 22.511μs ±3.69%

MoonE avatar Jun 02 '24 16:06 MoonE

Codecov Report

Attention: Patch coverage is 70.00000% with 3 lines in your changes are missing coverage. Please review.

Project coverage is 96.31%. Comparing base (48bd285) to head (8026eb5). Report is 13 commits behind head on master.

:exclamation: Current head 8026eb5 differs from pull request most recent head 51225c5

Please upload reports for the commit 51225c5 to get more accurate results.

Files Patch % Lines
src/Tools/TestGenerator.php 0.00% 3 Missing :warning:
Additional details and impacted files
@@             Coverage Diff              @@
##             master     #561      +/-   ##
============================================
- Coverage     96.55%   96.31%   -0.25%     
- Complexity     2166     2192      +26     
============================================
  Files            87       87              
  Lines          5025     5072      +47     
============================================
+ Hits           4852     4885      +33     
- Misses          173      187      +14     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Jun 02 '24 16:06 codecov[bot]

Maybe we should target 5.10.x ? Or keep 6.0 ?

williamdes avatar Aug 26 '24 11:08 williamdes

Maybe we should target 5.10.x ? Or keep 6.0 ?

If we are very strict about sementic versionning, keeping 6.0 makes sense because this PR removes accesses to public properties some projects could read directly, hence it causes a BC Break.

But if we are loosely respecting it, having on 5.10 makes sense also as to me, this is very internal classes and it shouldn't be accessed by external projects, hence it should not cause any BC Break.

I personnaly would go for 5.10.x, but I sometimes can be a cow-boy about it :laughing: .

niconoe- avatar Aug 26 '24 11:08 niconoe-