• Marcel van Lohuizen's avatar
    exp/locale/collate: removed weights struct to allow for faster and easier · 4c1a6f84
    Marcel van Lohuizen authored
    incremental comparisons. Instead, processing is now done directly on colElems.
    As a result, the size of the weights array is now reduced by 75%.
    Details:
    - Primary value of type 1 colElem is shifted by 1 bit so that primaries
      of all types can be compared without shifting.
    - Quaternary values are now stored in the colElem itself. This is possible
      as quaternary values other than 0 or maxQuaternary are only needed when other
      values are ignored.
    - Simplified processWeights by removing cases that are needed for ICU but not
      for us (our CJK primary values fit in a single value).
    
    R=r
    CC=golang-dev
    https://golang.org/cl/6817054
    4c1a6f84
collate.go 10.1 KB