Specialized character type constructors to improve ShapeCache hashing
This allows to avoid copying text runs character-per-character for 16bits text. Also there is no need to hash per character, just hash the whole string in one go. This also helps to save the construction of a StringHasher object (as we use the static method to hash the strings). Finally, reserve in HashTable space for 500 words (this reduces the number of rehashes in up to 4x). Bug: 735674 Change-Id: I4c5e23bb1e21dad995d4948fae0943a2b01309e0 Reviewed-on: https://chromium-review.googlesource.com/564076Reviewed-by:Adenilson Cavalcanti <cavalcantii@chromium.org> Reviewed-by:
Emil A Eklund <eae@chromium.org> Commit-Queue: Adenilson Cavalcanti <cavalcantii@chromium.org> Cr-Commit-Position: refs/heads/master@{#487543}
Showing
Please register or sign in to comment