|
Implement Math.random() purely in JavaScript.
This removes tons of architecture-specific code and makes it easy to
experiment with other pseudo-RNG algorithms. The crankshafted code is
extremely good, keeping all things unboxed and doing only minimal
checks, so it is basically equivalent to the handwritten code.
When benchmarks are run without parallel recompilation, we get a few
percent regression on SunSpider's string-validate-input and
string-base64, but these benchmarks run so fast that the overall
SunSpider score is hardly affected and within the usual jitter. Note
that these benchmarks actually run even faster when we don't
crankshaft at all on the main thread (the regression is not caused by
bad code, it is caused by Crankshaft needing a few hundred microsecond
for compilation of a trivial function). Luckily, when parallel
recompilation is enabled, i.e. in the browser, we see no regression at
all!
R=mstarzinger@chromium.org
Committed: http://code.google.com/p/v8/source/detail?r=17955
Total comments: 6
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+57 lines, -674 lines) |
Patch |
|
M |
src/arm/full-codegen-arm.cc
|
View
|
1
2
|
1 chunk |
+0 lines, -44 lines |
0 comments
|
Download
|
|
M |
src/arm/lithium-arm.h
|
View
|
1
2
|
2 chunks |
+0 lines, -23 lines |
0 comments
|
Download
|
|
M |
src/arm/lithium-arm.cc
|
View
|
1
2
|
1 chunk |
+0 lines, -13 lines |
0 comments
|
Download
|
|
M |
src/arm/lithium-codegen-arm.cc
|
View
|
1
2
3
4
|
1 chunk |
+0 lines, -62 lines |
0 comments
|
Download
|
|
M |
src/assembler.h
|
View
|
1
2
3
4
|
1 chunk |
+0 lines, -1 line |
0 comments
|
Download
|
|
M |
src/assembler.cc
|
View
|
1
|
1 chunk |
+0 lines, -6 lines |
0 comments
|
Download
|
|
M |
src/bootstrapper.cc
|
View
|
1
2
3
4
|
2 chunks |
+30 lines, -11 lines |
0 comments
|
Download
|
|
M |
src/contexts.h
|
View
|
1
2
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
src/globals.h
|
View
|
|
1 chunk |
+0 lines, -3 lines |
0 comments
|
Download
|
|
M |
src/heap.cc
|
View
|
1
2
|
1 chunk |
+3 lines, -1 line |
0 comments
|
Download
|
|
M |
src/hydrogen.cc
|
View
|
1
2
3
4
|
2 chunks |
+0 lines, -18 lines |
0 comments
|
Download
|
|
M |
src/hydrogen-instructions.h
|
View
|
1
2
3
4
|
2 chunks |
+0 lines, -23 lines |
0 comments
|
Download
|
|
M |
src/ia32/full-codegen-ia32.cc
|
View
|
1
2
|
1 chunk |
+0 lines, -51 lines |
0 comments
|
Download
|
|
M |
src/ia32/lithium-codegen-ia32.cc
|
View
|
1
2
3
4
|
1 chunk |
+0 lines, -63 lines |
0 comments
|
Download
|
|
M |
src/ia32/lithium-ia32.h
|
View
|
1
2
|
2 chunks |
+0 lines, -23 lines |
0 comments
|
Download
|
|
M |
src/ia32/lithium-ia32.cc
|
View
|
1
2
|
1 chunk |
+0 lines, -13 lines |
0 comments
|
Download
|
|
M |
src/math.js
|
View
|
1
2
|
1 chunk |
+8 lines, -1 line |
0 comments
|
Download
|
|
M |
src/mips/full-codegen-mips.cc
|
View
|
1
2
|
1 chunk |
+0 lines, -42 lines |
0 comments
|
Download
|
|
M |
src/mips/lithium-codegen-mips.cc
|
View
|
1
2
3
4
|
1 chunk |
+0 lines, -62 lines |
0 comments
|
Download
|
|
M |
src/mips/lithium-mips.h
|
View
|
1
2
|
2 chunks |
+0 lines, -23 lines |
0 comments
|
Download
|
|
M |
src/mips/lithium-mips.cc
|
View
|
1
2
|
1 chunk |
+0 lines, -13 lines |
0 comments
|
Download
|
|
M |
src/objects.h
|
View
|
1
2
|
1 chunk |
+0 lines, -1 line |
0 comments
|
Download
|
|
M |
src/runtime.h
|
View
|
1
2
3
4
|
1 chunk |
+0 lines, -1 line |
0 comments
|
Download
|
|
M |
src/serialize.cc
|
View
|
1
2
3
4
|
1 chunk |
+0 lines, -4 lines |
0 comments
|
Download
|
|
M |
src/v8.h
|
View
|
|
1 chunk |
+0 lines, -2 lines |
0 comments
|
Download
|
|
M |
src/v8.cc
|
View
|
|
1 chunk |
+0 lines, -19 lines |
0 comments
|
Download
|
|
M |
src/x64/full-codegen-x64.cc
|
View
|
1
2
|
1 chunk |
+0 lines, -41 lines |
0 comments
|
Download
|
|
M |
src/x64/lithium-codegen-x64.cc
|
View
|
1
2
3
4
|
1 chunk |
+0 lines, -60 lines |
0 comments
|
Download
|
|
M |
src/x64/lithium-x64.h
|
View
|
1
2
|
2 chunks |
+0 lines, -23 lines |
0 comments
|
Download
|
|
M |
src/x64/lithium-x64.cc
|
View
|
1
2
|
1 chunk |
+0 lines, -13 lines |
0 comments
|
Download
|
|
M |
test/cctest/test-weaktypedarrays.cc
|
View
|
1
2
3
|
12 chunks |
+14 lines, -12 lines |
0 comments
|
Download
|
Total messages: 8 (0 generated)
|