Reviewers: danno,
Message:
Use division instructions on CPUs that support them. Although it doesn't
show
performance increase in mainstream benchmarks, a microbenchmark shows a good
improvement.
-- code --
var limit = 5000;
function test_div() {
for (var i = 1; i <= limit; i++) {
for (var j = 1; j <= limit; j++) {
Math.floor(i / j);
}
}
}
test_div();
-- results --
$ time v8/d8-nopatch --nodead-code-elimination math-floor-of-div.js
real 0m3.913s
user 0m3.920s
sys 0m0.020s
$ time v8/d8-patch --nodead-code-elimination math-floor-of-div.js
real 0m0.195s
user 0m0.190s
sys 0m0.000s
Description:
ARM: Use division instructions in lithium and stubs
BUG=none
TEST=none
Please review this at https://codereview.chromium.org/11316105/
SVN Base: http://v8.googlecode.com/svn/branches/bleeding_edge/
Affected files:
M src/arm/code-stubs-arm.cc
M src/arm/lithium-arm.cc
M src/arm/lithium-codegen-arm.cc
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev