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

Issue 11212004: Add a faster API for creating v8::Integer objects (Closed)

Created:
8 years, 2 months ago by abarth-chromium
Modified:
8 years, 2 months ago
Reviewers:
Sven Panne, danno
CC:
v8-dev, haraken, eseidel1
Base URL:
git://github.com/v8/v8.git@master
Visibility:
Public.

Description

Add a faster API for creating v8::Integer objects In WebKit, we have a small integer cache because calling v8::Integer::New is slow. This patch adds a faster API for creating integers that requires the caller to supply the v8::Isolate, saving us the work of looking up the isolate in thread-local storage. BUG= Committed: https://code.google.com/p/v8/source/detail?r=12773

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+66 lines, -8 lines) Patch
include/v8.h View 1 chunk +2 lines, -0 lines 0 comments Download
M src/api.cc View 1 chunk +23 lines, -8 lines 0 comments Download
M test/cctest/test-api.cc View 4 chunks +41 lines, -0 lines 0 comments Download

Messages

Total messages: 8 (0 generated)
abarth-chromium
I wasn't sure whether we want to supply the isolate as the first parameter or ...
8 years, 2 months ago (2012-10-17 21:32:11 UTC) #1
abarth-chromium
Also, I haven't benchmarked the performance difference between the two APIs. I'm secretly hoping haraken ...
8 years, 2 months ago (2012-10-17 21:33:04 UTC) #2
abarth-chromium
Benchmarks have verified that this API is faster than the old API, but perhaps not ...
8 years, 2 months ago (2012-10-18 01:12:41 UTC) #3
Jakob Kummerow
[-dano +danno]
8 years, 2 months ago (2012-10-18 07:35:07 UTC) #4
abarth-chromium
This API isn't fast enough to replace the integer cache we have on the WebKit ...
8 years, 2 months ago (2012-10-18 23:55:19 UTC) #5
danno
If you are going to go through all this trouble to optimize for the isolate, ...
8 years, 2 months ago (2012-10-19 07:31:18 UTC) #6
abarth-chromium
I wanted to do that, but I wasn't sure how. I couldn't figure out how ...
8 years, 2 months ago (2012-10-19 08:32:27 UTC) #7
danno
8 years, 2 months ago (2012-10-19 11:00:34 UTC) #8
Actually, I don't know if you will ever be able to replace the int cache with
this code, since it allocates handles. Even if it's inlined, the handle
allocation will probably make it more than trivially expensive.

I'll land this in its current form which LGTM. At some point, mstarzinger or
svenpanne might want to make it inlinable, but that won't change the API.

Powered by Google App Engine
This is Rietveld 408576698