Bug #84577 strnxfrm runs slower when tailoring rule contains contraction
Submitted: 20 Jan 2017 8:49 Modified: 6 Feb 2017 16:37
Reporter: Xing Zhang Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Charsets Severity:S3 (Non-critical)
Version: OS:Any
Assigned to: CPU Architecture:Any

[20 Jan 2017 8:49] Xing Zhang
Description:
The strnxfrm function of uca 9.0.0 collations runs very slow when the tailoring rule contains contraction.

How to repeat:
Run benchmark test.
# Run 333 Microbenchmarks.BM_MixedUTF8MB4_AS_CS
BM_MixedUTF8MB4_AS_CS                       1042960 iterations        505 ns/iter   421.04 MB/sec
# Run 337 Microbenchmarks.BM_Hungarian_AS_CS
BM_Hungarian_AS_CS                           178182 iterations       5619 ns/iter    20.20 MB/sec

Test#333 is for collation without contraction, and test#337 is for collation with contractions. Test#337 is about 10X slower than #333.
[6 Feb 2017 16:37] Paul DuBois
Posted by developer:
 
Noted in 8.0.1 changelog.

Calculations for UCA 9.0.0 collations were inefficient for tailoring
rules containing contraction characters.
[21 Aug 2017 19:47] Paul DuBois
Posted by developer:
 
Fixed in 8.0.3.

Calculations for UCA 9.0.0 collations were inefficient for tailoring
rules containing contraction characters.