cc: Optimize the tile map key hash for 4-byte size_t.
commit1dfbd1030bd04e76ba41bff933cd2d8fc6d1e3f0
authorvmpstr <vmpstr@chromium.org>
Mon, 18 May 2015 23:07:52 +0000 (18 16:07 -0700)
committerCommit bot <commit-bot@chromium.org>
Mon, 18 May 2015 23:08:53 +0000 (18 23:08 +0000)
tree39858e938e4c0b9278d6f5825e506798526d4cc4
parentc36d372598ce9766bd53e756d5d1ebae3b4a0500
cc: Optimize the tile map key hash for 4-byte size_t.

This patch changes the hash function for the tile map key to use
16 least significant bits from each index. This makes it faster on
systems where sizeof(size_t) == 4.

The collisions would only start happening after a large enough index.

This makes the TilingSetRasterQueueConstructAndIterate test do
about 10% more iterations per second on N4.

BUG=488636
R=enne, danakj

Review URL: https://codereview.chromium.org/1133243010

Cr-Commit-Position: refs/heads/master@{#330448}
cc/tiles/picture_layer_tiling.cc
cc/tiles/picture_layer_tiling.h