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

Issue 8323001: By pass object boxing for all js primitives. (Closed)

Created:
9 years, 2 months ago by John Lenz
Modified:
9 years, 2 months ago
Reviewers:
floitsch
CC:
reviews_dartlang.org
Visibility:
Public.

Description

By pass object boxing for all js primitives. Committed: https://code.google.com/p/dart/source/detail?r=510

Patch Set 1 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+5 lines, -5 lines) Patch
M compiler/lib/implementation/core.js View 1 chunk +5 lines, -5 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
John Lenz
9 years, 2 months ago (2011-10-17 18:34:03 UTC) #1
John Lenz
On 2011/10/17 18:34:03, John Lenz wrote: This is going to wait until the performance tests ...
9 years, 2 months ago (2011-10-17 18:44:20 UTC) #2
floitsch
LGTM. But I just looked at the assembly and got the impression that typeof(x) == ...
9 years, 2 months ago (2011-10-18 10:48:40 UTC) #3
John Lenz
9 years, 2 months ago (2011-10-18 16:18:02 UTC) #4
On 2011/10/18 10:48:40, floitsch wrote:
> LGTM.
> But I just looked at the assembly and got the impression that typeof(x) ==
> "number" is much more optimized than typeof(x) == typeof(y).
> It could be that I'm wrong (maybe the type-feedback wasn't kicking in yet).
> If typeof(x) == "number" really is more optimized I would also investigate for
> typeof(x) == "string". If necessary write it then as:
> if (typeof(x) == 'number') {
>   return (typeof(y) == 'number') && x === y;
> } else if (typeof(x) == 'string') {
>   return ...
> ...
> } else {
>   return (typeof(y) != 'number') && (typeof(y) != 'string') ... &&
>          x.eq$operator(y);
> }

Lets see what Golem makes of it.

Powered by Google App Engine
This is Rietveld 408576698