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

Issue 9361038: Add Navier-Stokes benchmark. (Closed)

Created:
8 years, 10 months ago by danno
Modified:
8 years, 10 months ago
CC:
v8-dev
Visibility:
Public.

Description

Patch Set 1 #

Patch Set 2 : Non-zero test data and correct copyright #

Total comments: 7
Unified diffs Side-by-side diffs Delta from patch set Stats (+402 lines, -0 lines) Patch
A benchmarks/navier-stokes.js View 1 1 chunk +402 lines, -0 lines 7 comments Download

Messages

Total messages: 4 (0 generated)
danno
8 years, 10 months ago (2012-02-08 16:07:49 UTC) #1
danno
8 years, 10 months ago (2012-02-08 16:10:15 UTC) #2
danno
8 years, 10 months ago (2012-02-08 16:10:43 UTC) #3
kasperl
8 years, 10 months ago (2012-02-09 07:09:12 UTC) #4
First round of comments:

https://chromiumcodereview.appspot.com/9361038/diff/4002/benchmarks/navier-st...
File benchmarks/navier-stokes.js (right):

https://chromiumcodereview.appspot.com/9361038/diff/4002/benchmarks/navier-st...
benchmarks/navier-stokes.js:27: var name = 'navier-stokes2';
I think you should make this fit with the other benchmarks in the V8 benchmark
suite before submitting it. I don't think you need the name variable.

You'll need to create a setup, run, and tear down function (you almost have
these). The tear down function should reset the global |solver| variable to
undefined or null so that a GC will get rid of the FluidField object.

Also it would be good to make sure to update the documentation (in the various
html and readme files).

https://chromiumcodereview.appspot.com/9361038/diff/4002/benchmarks/navier-st...
benchmarks/navier-stokes.js:31: solver = new FluidField(null);
The |solver| variable is undeclared. Add a global solver variable with 'var'.
Another thing: Could we make this 2 space indent instead of 4?

https://chromiumcodereview.appspot.com/9361038/diff/4002/benchmarks/navier-st...
benchmarks/navier-stokes.js:39: function runNavierStokes()
I would replace this entire method with a call to solver.update() and use the
benchmark harness from base.js to drive it.

https://chromiumcodereview.appspot.com/9361038/diff/4002/benchmarks/navier-st...
benchmarks/navier-stokes.js:54: // This code is copied from Oliver's html page.
Reference to the exact page?

https://chromiumcodereview.appspot.com/9361038/diff/4002/benchmarks/navier-st...
benchmarks/navier-stokes.js:68: var x1 = [329, 312, 62, 326, 96, 480, 359, 487,
If any of these variables change during the execution of the benchmark, it would
be nice to make sure they are initialized in the setup function.

https://chromiumcodereview.appspot.com/9361038/diff/4002/benchmarks/navier-st...
benchmarks/navier-stokes.js:77: var pointCount = 0;
Is there anyway you can check that the benchmark behaves correctly based on some
of these counters? In general, it is much better if the benchmarks do at least a
certain amount of checking (some of it might be postponable to the tear down
face).

https://chromiumcodereview.appspot.com/9361038/diff/4002/benchmarks/navier-st...
benchmarks/navier-stokes.js:93: setupNavierStokes();
These two calls should be dealt with by the benchmark harness.

Powered by Google App Engine
This is Rietveld 408576698