Reland "[PartitionAlloc] Use reciprocal multiplication to speed up GetSlotOffset"
This is a reland of 4d9450df Original change's description: > [PartitionAlloc] Use reciprocal multiplication to speed up GetSlotOffset > > Currently, the "get offset of a pointer within its allocated slot" > functionality, which is used extensively by several MiraclePtr > implementations, performs an expensive modulo operation. This commit > replaces it with a cheaper sequence of multiplications and bit shifts. > > Bug: 1092288 > Change-Id: I866689a79fff704b5f83fc07d8f28b3386ef644d > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2335443 > Commit-Queue: Sergei Glazunov <glazunov@google.com> > Reviewed-by: Benoit L <lizeb@chromium.org> > Reviewed-by: Bartek Nowierski <bartekn@chromium.org> > Reviewed-by: Kentaro Hara <haraken@chromium.org> > Cr-Commit-Position: refs/heads/master@{#802194} Bug: 1092288 Change-Id: Iec17efe8f9837f55c2f40dcf80033e6efd9580dc Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2380277 Commit-Queue: Sergei Glazunov <glazunov@google.com> Reviewed-by:Benoit L <lizeb@chromium.org> Reviewed-by:
Kentaro Hara <haraken@chromium.org> Cr-Commit-Position: refs/heads/master@{#802700}
Showing
Please register or sign in to comment