[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Public WebGL] WebKit 20-50% slower than Chrome/Minefield using large Float32Array Arrays



Title: Re: [Public WebGL] WebKit 20-50% slower than Chrome/Minefi
Ignore my previous reporting of differences in running with typed and untyped arrays on Chrome!

I had added more work to the computational model after making a version that ran with untyped arrays and that additional work wasn't added to the untyped test.

I now have just one page: model2d.html which uses *ONE* _javascript_ file: model2d.js which can be dynamically set to use either typed or untyped arrays. So any future updates to the computational model will be for both typed and un-typed arrays.

For example:



I've summarized the updated data generated by testing both regular and Typed Arrays using just this page:

  http://visual-demos.dev.concord.org/seasons/earth/model2d.html

In every browser I tested using Typed Arrays is *faster*

                                      steps per second
browser/version                       Regular Arrays       Typed Arrays
------------------------------------------------------------------------
Minefield 4.0b12pre (2011-02-22):      9.1                  13.2

WebKit 79303:                          7.5                  15.4

Chrome 9.0.597.102                   18.2                  42.0

Chrome 10.0.648.82 beta               20.4                  54.6


Tests run after restart with minimal other services running.

Each test (both the regular and typed) was done after emptying the browser cache and reloading the page and run for at least 150model steps.

There is a strange problem in Chrome which might be a memory leak.

If I empty the browser cache load the page, turn off rendering, run the regular model test, stop the test, select typed arrays, and run the typed array test the typed array speed is much slower than if I first run the typed test first.

Here's the data for Chrome Typed array slowdown *after* first running with regular arrays.

  Chrome 9:  42.0 => 10.2
  Chrome 10  54.6 => 25.4

I ran my tests on a MacBook Pro, Mac OS X 10.6.6, Intel Core i& 2.66 GHz

The code is available here:  https://github.com/stepheneb/seasons/blob/master/earth/model2d.html