Please sign in to comment.
Optimize Canonical Ordering Algorithm.
Canonical Ordering Algorithm requires stable sorting of every sequence of combining characters (characters with combining class > 0) inside the string. Performing stable sorting (bubble sort) only on those sequences instead of applying sorting to the whole string reduces the running time of the nomalization test (on the full suit from NormalizationTest.txt) in half (on my machine it reduced from ~40 seconds to ~20 seconds). I think the performance boost might be even more noticeable on longer strings.
- Loading branch information...
Showing with 37 additions and 8 deletions.