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

Issue 179059: Cache the results of slow math operations on machines that don't... (Closed)

Created:
11 years, 3 months ago by Erik Corry
Modified:
9 years, 7 months ago
CC:
v8-dev
Visibility:
Public.

Description

Cache the results of slow math operations on machines that don't have hardware fpu instructions to execute them. Committed: http://code.google.com/p/v8/source/detail?r=2790

Patch Set 1 #

Total comments: 5
Unified diffs Side-by-side diffs Delta from patch set Stats (+121 lines, -8 lines) Patch
M src/heap.h View 2 chunks +86 lines, -0 lines 3 comments Download
M src/heap.cc View 2 chunks +27 lines, -0 lines 2 comments Download
M src/runtime.cc View 8 chunks +8 lines, -8 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
Erik Corry
11 years, 3 months ago (2009-09-01 08:08:43 UTC) #1
Søren Thygesen Gjesse
LGTM http://codereview.chromium.org/179059/diff/1/2 File src/heap.cc (right): http://codereview.chromium.org/179059/diff/1/2#newcode3995 Line 3995: for (int i = 0; i < ...
11 years, 3 months ago (2009-09-01 08:40:31 UTC) #2
Erik Corry
11 years, 3 months ago (2009-09-01 09:02:28 UTC) #3
http://codereview.chromium.org/179059/diff/1/2
File src/heap.cc (right):

http://codereview.chromium.org/179059/diff/1/2#newcode3995
Line 3995: for (int i = 0; i < kCacheSize; i++) {
On 2009/09/01 08:40:31, Søren Gjesse wrote:
> Would memcpy be faster here?

Possibly, but I don't expect this function to be called all that often, and it
would look messier.

http://codereview.chromium.org/179059/diff/1/4
File src/heap.h (right):

http://codereview.chromium.org/179059/diff/1/4#newcode1533
Line 1533: TranscendentalCache* cache = caches_[type];
On 2009/09/01 08:40:31, Søren Gjesse wrote:
> The description says "Cache the results of slow math operations on machines
that
> don't have hardware fpu instructions to execute them.", however it looks as if
> the cache is always enabled. Is that intentional?

The cache only works in the runtime system.  If we have an instruction for the
transcendental then we generate it inline and never normally enter the runtime
system.

Powered by Google App Engine
This is Rietveld 408576698