Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(111)

Issue 429743002: Make QPCValueToMicroseconds faster in case the value is less than 44 bits (Closed)

Created:
6 years, 4 months ago by fmeawad
Modified:
6 years, 4 months ago
CC:
chromium-reviews, erikwright+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Make QPCValueToMicroseconds faster in case the value is less than 44 bits If the QPC value is less than 44 bits, it is safe to multiply by a 20 bits value (1000000) without risking overflow. This optimization reduces the call time by half. BUG=158234 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=287704

Patch Set 1 #

Total comments: 10

Patch Set 2 : Add unit tests, change bit check to a compare" #

Patch Set 3 : Fix comments #

Patch Set 4 : Typo #

Total comments: 4

Patch Set 5 : Add one more test for exactly qpc_value is the threshold #

Unified diffs Side-by-side diffs Delta from patch set Stats (+45 lines, -5 lines) Patch
M base/time/time.h View 1 2 3 4 1 chunk +5 lines, -0 lines 0 comments Download
M base/time/time_win.cc View 1 2 3 2 chunks +9 lines, -5 lines 0 comments Download
M base/time/time_win_unittest.cc View 1 2 3 4 1 chunk +31 lines, -0 lines 0 comments Download

Messages

Total messages: 15 (0 generated)
fmeawad
Hi Brian, Can you have a look and suggest an owner.
6 years, 4 months ago (2014-07-29 23:04:34 UTC) #1
brianderson
https://codereview.chromium.org/429743002/diff/1/base/time/time_win.cc File base/time/time_win.cc (left): https://codereview.chromium.org/429743002/diff/1/base/time/time_win.cc#oldcode394 base/time/time_win.cc:394: if (!ticks_per_second_) I remember you had an explanation for ...
6 years, 4 months ago (2014-07-29 23:53:29 UTC) #2
fmeawad
Thank you for the quick review. PTAL. https://codereview.chromium.org/429743002/diff/1/base/time/time_win.cc File base/time/time_win.cc (left): https://codereview.chromium.org/429743002/diff/1/base/time/time_win.cc#oldcode394 base/time/time_win.cc:394: if (!ticks_per_second_) ...
6 years, 4 months ago (2014-07-30 00:49:49 UTC) #3
brianderson
lgtm, but I'm not an OWNER here. https://codereview.chromium.org/429743002/diff/1/base/time/time_win.cc File base/time/time_win.cc (left): https://codereview.chromium.org/429743002/diff/1/base/time/time_win.cc#oldcode394 base/time/time_win.cc:394: if (!ticks_per_second_) ...
6 years, 4 months ago (2014-07-30 00:58:19 UTC) #4
fmeawad
Adding jar@ for owners, PTAL.
6 years, 4 months ago (2014-07-30 17:18:40 UTC) #5
jar (doing other things)
https://codereview.chromium.org/429743002/diff/1/base/time/time_win.cc File base/time/time_win.cc (right): https://codereview.chromium.org/429743002/diff/1/base/time/time_win.cc#newcode397 base/time/time_win.cc:397: if (qpc_value & 0xFFFFF00000000000) Please unit test at exactly ...
6 years, 4 months ago (2014-07-30 23:43:09 UTC) #6
jar (doing other things)
Interesting patch.... I did some calculations... see if you agree. https://codereview.chromium.org/429743002/diff/1/base/time/time_win.cc File base/time/time_win.cc (right): https://codereview.chromium.org/429743002/diff/1/base/time/time_win.cc#newcode397 ...
6 years, 4 months ago (2014-07-31 00:01:44 UTC) #7
fmeawad
On 2014/07/31 00:01:44, jar wrote: > Interesting patch.... I did some calculations... see if you ...
6 years, 4 months ago (2014-07-31 00:20:01 UTC) #8
fmeawad
PTAL. https://codereview.chromium.org/429743002/diff/1/base/time/time_win.cc File base/time/time_win.cc (right): https://codereview.chromium.org/429743002/diff/1/base/time/time_win.cc#newcode397 base/time/time_win.cc:397: if (qpc_value & 0xFFFFF00000000000) On 2014/07/31 00:01:43, jar ...
6 years, 4 months ago (2014-07-31 18:54:21 UTC) #9
jar (doing other things)
LGTM % the additional test. I'm then convinced... but you'll need a current base owner, ...
6 years, 4 months ago (2014-08-01 04:55:32 UTC) #10
willchan no longer on Chromium
I'm rubberstamping LGTM this. jar@ used to own this code anyway, and he seems to ...
6 years, 4 months ago (2014-08-01 22:41:55 UTC) #11
fmeawad
https://codereview.chromium.org/429743002/diff/60001/base/time/time.h File base/time/time.h (right): https://codereview.chromium.org/429743002/diff/60001/base/time/time.h#newcode234 base/time/time.h:234: // To avoid overflow in QPC to Microseconds calculations, ...
6 years, 4 months ago (2014-08-05 22:20:10 UTC) #12
fmeawad
The CQ bit was checked by fmeawad@chromium.org
6 years, 4 months ago (2014-08-05 22:54:17 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/fmeawad@chromium.org/429743002/80001
6 years, 4 months ago (2014-08-05 22:59:24 UTC) #14
commit-bot: I haz the power
6 years, 4 months ago (2014-08-06 06:21:23 UTC) #15
Message was sent while issue was closed.
Change committed as 287704

Powered by Google App Engine
This is Rietveld 408576698