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

Issue 9065008: Improve performance of Math.min and Math.max for the case of two arguments. (Closed)

Created:
8 years, 11 months ago by Yang
Modified:
8 years, 11 months ago
CC:
v8-dev
Visibility:
Public.

Description

Improve performance of Math.min and Math.max for the case of two arguments. BUG=v8:1325 TEST= Committed: http://code.google.com/p/v8/source/detail?r=10321

Patch Set 1 #

Total comments: 5
Unified diffs Side-by-side diffs Delta from patch set Stats (+27 lines, -1 line) Patch
M src/math.js View 3 chunks +27 lines, -1 line 5 comments Download

Messages

Total messages: 5 (0 generated)
Yang
Please take a look. Math.min and Math.max are almost always used with two arguments only. ...
8 years, 11 months ago (2012-01-02 16:11:01 UTC) #1
Lasse Reichstein
drive-by-comment http://codereview.chromium.org/9065008/diff/1/src/math.js File src/math.js (right): http://codereview.chromium.org/9065008/diff/1/src/math.js#newcode130 src/math.js:130: return (arg1 === 0 && !%_IsSmi(arg1) && 1 ...
8 years, 11 months ago (2012-01-03 06:17:45 UTC) #2
Lasse Reichstein
http://codereview.chromium.org/9065008/diff/1/src/math.js File src/math.js (right): http://codereview.chromium.org/9065008/diff/1/src/math.js#newcode130 src/math.js:130: return (arg1 === 0 && !%_IsSmi(arg1) && 1 / ...
8 years, 11 months ago (2012-01-03 07:57:48 UTC) #3
Yang
I implemented %_IsMinusZero for non-crankshaft, and running without crankshaft there seems to be no visible ...
8 years, 11 months ago (2012-01-03 08:59:34 UTC) #4
fschneider
8 years, 11 months ago (2012-01-03 09:52:06 UTC) #5
LGTM.

http://codereview.chromium.org/9065008/diff/1/src/math.js
File src/math.js (right):

http://codereview.chromium.org/9065008/diff/1/src/math.js#newcode127
src/math.js:127: if (arg1 == arg2) {
It does not make a difference for numbers, but I'd consistently use either ===
or ==.

Powered by Google App Engine
This is Rietveld 408576698