How to run benchmarks in V8

555 views
Skip to first unread message

v8unl

unread,
Dec 9, 2012, 10:37:43 PM12/9/12
to v8-u...@googlegroups.com
Hello,

I am new to V8 and I was wondering how to run benchmarks like sunspider or the benchmarks provided in V8 package.

I am able to run small helloworld.js from ./shell or from ./d8 but I am getting the following error when I am trying to run the benchmarks

/shell  /home/shakthi/Desktop/Research/Workspace/V8/v8/out/x64.release/sunspiderRun/run.js 
iteration -1 : loading 3d-cube.js
/home/shakthi/Desktop/Research/Workspace/V8/v8/out/x64.release/sunspiderRun/run.js:36: Error loading file
            load(category.name + "-" + test.name + ".js");



            ^
./shell benchmarks/run.js 
benchmarks/run.js:29: Error loading file
load('base.js');
^

System Details: Ubuntu on 64 bit machine

Please, let me know what would be the steps to run benchmarks in V8 or where  I am making the mistake.

Thanks,
Shakti


Paul Lind

unread,
Dec 10, 2012, 12:49:38 AM12/10/12
to v8-u...@googlegroups.com
Shakti -

For v8 benchmark, cd into the benchmarks directory, and run it from there:

cd benchmarks
/path/to/shell run.js

In your clip below, you can see that run.js is trying to load other files from that same directory.

Sunspider benchmark is run via the included perl script also called 'sunspider', which you can get from webkit repo: https://github.com/WebKit/webkit/tree/master/PerformanceTests/SunSpider

but I think that newer versions of the test (still called 0.9.1) expect the shell to export some function(s) that the v8 shell does not. I don't have the code in front of me now to check this out. Maybe someone else can respond.

thanks,

paul

Yang Guo

unread,
Dec 10, 2012, 5:01:57 AM12/10/12
to v8-u...@googlegroups.com
Load is a custom function built into d8 to load additional files by relative path. You will have to change the path it loads from to fit your file system.

Yang

v8unl

unread,
Dec 10, 2012, 8:39:17 PM12/10/12
to v8-u...@googlegroups.com
Thank you Paul and Yang

Now. the benchmarks of V8 are working . But, SunSpider is not working in V8 (As, Paul has mentioned we need export some functions for which I am not getting resources.).

perl sunspider --shell=/home/shakthi/Desktop/Research/Workspace/V8/v8/out/x64.release/shell

Running SunSpider once for warmup, then 10 times
Discarded first run.
[resources/sunspider-standalone-driver.js:54: ReferenceError: run is not defined
            times[j] = run(testName);
                       ^
ReferenceError: run is not defined
    at resources/sunspider-standalone-driver.js:54:24
    at resources/sunspider-standalone-driver.js:75:3,
resources/sunspider-standalone-driver.js:54: ReferenceError: run is not defined
            times[j] = run(testName);

This link explains it but they do not mention whether the issue is fixed or not.

https://bugs.webkit.org/show_bug.cgi?id=71801

Thanks,
Shakthi

Jakob Kummerow

unread,
Dec 11, 2012, 4:10:57 AM12/11/12
to v8-u...@googlegroups.com
Looks like the Sunspider runner expects the shell to expose a "run()" method. I have no idea what that method is supposed to do, and considering how useless Sunspider is as a benchmark, I don't think investigating/implementing it is a good use of anyone's time.

v8unl

unread,
Dec 11, 2012, 9:53:07 AM12/11/12
to v8-u...@googlegroups.com
Thank You Jakob.

What would you suggest some good benchmarks other than the one we have in V8.

Thanks,
Shakthi

Jakob Kummerow

unread,
Dec 11, 2012, 11:35:39 AM12/11/12
to v8-u...@googlegroups.com
A good benchmark should be representative of the workload you're interested in measuring.

v8unl

unread,
Dec 19, 2012, 3:08:29 PM12/19/12
to v8-u...@googlegroups.com
I am still in my early stages of research. But, I was looking at concurrency in dynamic languages.

Jakob Kummerow

unread,
Dec 20, 2012, 6:59:31 AM12/20/12
to v8-u...@googlegroups.com
There is no concurrency in JavaScript (per its language specification).
Reply all
Reply to author
Forward
0 new messages