Revert "[PartitionAlloc] Use reciprocal multiplication to speed up GetSlotOffset"
This reverts commit 4d9450df. Reason for revert: Likely caused the test PartitionAllocTest.DumpMemoryStats failing consistently in android x86 builders since: * https://ci.chromium.org/p/chromium/builders/ci/android-marshmallow-x86-rel/1084 * https://ci.chromium.org/p/chromium/builders/ci/android-pie-x86-rel/1992 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} TBR=haraken@chromium.org,lizeb@chromium.org,bartekn@chromium.org,glazunov@google.com Change-Id: Iaed8d78231201dd69a880e8a30028ddd64bead94 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: 1092288 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2380107Reviewed-by:Haiyang Pan <hypan@google.com> Commit-Queue: Haiyang Pan <hypan@google.com> Cr-Commit-Position: refs/heads/master@{#802323}
Showing
Please register or sign in to comment