webgl测试
一年多以前,我们发布了 一篇博客文章, 其中包含Unity WebGL的性能基准,以比较不同浏览器中WebGL的性能。 我们认为现在是时候重新审视那些基准,看看数字是如何变化的。 (A bit over a year ago, we released a blog post with performance benchmarks for Unity WebGL, to compare WebGL performance in different browsers. We figured it was time to revisit those benchmarks to see how the numbers have changed. )
Microsoft has since released Windows 10 with their new Edge browser (which supports asm.js and is now enabling it by default) – so we were interested to see how that competes. Also, we have an experimental build of Unity using Shared Array Buffers to run multithreaded code, and we wanted to see what kind of performance gains to expect. So we tested this in a nightly build of Firefox with Shared Array Buffer support.
此后,Microsoft随其新的 Edge 浏览器 一起发布了Windows 10 (该浏览器 支持asm.js ,现在 默认情况下启用了它 )–因此我们很想知道它的竞争方式。 另外,我们有一个使用 共享数组缓冲区 运行多线程代码 的Unity实验性构建 ,并且我们想知道期望获得什么样的性能提升。 因此,我们在支持共享阵列缓冲区的Firefox每晚版本中对此进行了测试。
You are welcome try our updated benchmark suite in your own browser here.
欢迎您 在此处使用 自己的浏览器尝试更新的基准套件 。
与去年基准相比方法更改的一些注意事项: (Some notes on methodology changes from last year’s benchmarks:)
-
This is using an updated build of the benchmark suite built in Unity 5.3. You can download the project folder for this benchmark suite here, so you can experiment with it locally, or try it on other platforms.
这使用的是Unity 5.3中构建的基准套件的更新版本。 您可以在 此处 下载此基准测试套件的项目文件夹 ,以便可以在本地进行试验,或在其他平台上进行尝试。
-
This version has been stripped of all of the artwork and eye candy we had in the previous version. They added no value to the benchmarks, and the programmer art used never looked good anyway. Stripping the assets makes the builds smaller, and, more importantly, allows us to redistribute the project folder (see the link above).
此版本已删除了先前版本中的所有艺术品和糖果。 他们没有为基准增加任何价值,而且所使用的程序员技术也从未看起来很好。 剥离资产可以使构建更小,更重要的是,允许我们重新分发项目文件夹(请参见上面的链接)。
-
We omitted the “Mandelbrot GPU” benchmark from the test suite, as that test would really only benchmark the GPU and not show significantly different results on different browsers – so it would skew the overall results to show smaller relative differences.
我们从测试套件中省略了“ Mandelbrot GPU”基准测试,因为该测试实际上仅对GPU进行了基准测试,并且在不同的浏览器上不会显示出显着不同的结果-因此,它会使总体结果偏斜以显示较小的相对差异。
-
We omitted the comparison to a native standalone build we did last year, as we found those results to be misleading, as we are often running different code on different platforms (like different shader implementations with different quality settings – and also different scripting engines).
我们忽略了与去年进行的本机独立构建的比较,因为我们发现这些结果具有误导性,因为我们经常在不同的平台上运行不同的代码(例如具有不同质量设置的不同着色器实现以及不同的脚本引擎)。
-
We tested EdgeHTML 12 (Edge 20.10240.16384.0), which was the latest version when we ran the benchmarks, and which did not have asm.js enabled by default – so we turned it on manually. By now EdgeHTML 13 is released, which has asm.js enabled by default.
我们测试了EdgeHTML 12( Edge 20.10240.16384.0) ,它是运行基准测试时的最新版本,并且默认情况下未启用asm.js,因此我们手动将其打开。 到目前为止,EdgeHTML 13已发布,默认情况下启用了asm.js。
Here are the overall scores of the different browsers running the benchmark suite on an Windows 10 machine with a 3.3.GHz i7 CPU and an Nvidia GTX 960 GPU. Firefox 45 with Shared Array Buffers has a greyed out bar, as this is an experimental build of Unity running on a nightly build of Firefox:
以下是在配备3.3.GHz i7 CPU和Nvidia GTX 960 GPU的Windows 10计算机上运行基准套件的不同浏览器的总体评分。 带有共享数组缓冲区的Firefox 45带有 灰色栏,因为这是在每晚版本的Firefox上运行的Unity实验性版本:
Here are the scores of the different browsers running the benchmark suite on Mac OS X on a Retina MacBook Pro 15” with an 2.6 GHz i7 CPU (so we can see how Safari compares against the other browsers):
以下是在带有2.6 GHz i7 CPU的Retina MacBook Pro 15”上在Mac OS X上运行基准套件的不同浏览器的得分(因此我们可以看到Safari与其他浏览器的比较):
Here are the detailed results for each benchmark on windows (results scaled so that Firefox 41 32-bit equals 1.0 for each test):
以下是Windows上每个基准测试的详细结果(按比例缩放结果,以使Firefox 41 32位等于1.0的每个测试):
And on OS X (again, scaled so that Firefox equals 1.0 for each test):
在OS X上(再次进行缩放,以便每个测试Firefox等于1.0):
Here are the overall results from the benchmark build we showed last year compared to today, to see how performance has changed since (running on Mac OS X on a Retina MacBook Pro 15” with an 2.6 GHz i7 CPU):
以下是我们去年展示的基准测试与今天相比的总体结果,以查看性能如何发生了变化(在配备2.6 GHz i7 CPU的Retina MacBook Pro 15”上的Mac OS X上运行):
Finally, here is a benchmark of how long it takes for Unity content to start up. The bars below represent the time in seconds it took between opening the benchmark project and rendering the first frame in different browsers. This is running content from a local disk, so the time to download files from the network is ignored. Firefox performs caching of asm.js compilation results, which means that when the same content is run more than once, compilation can be skipped, and subsequent runs will load faster. So we are showing numbers for both cold (first run) and hot (subsequent run with loading asm.js from cache) runs for Firefox:
最后,这是Unity内容启动需要多长时间的基准。 下面的条形图表示从打开基准测试项目到在不同浏览器中呈现第一帧之间花费的时间(以秒为单位)。 这是从本地磁盘运行内容,因此可以忽略从网络下载文件的时间。 Firefox对asm.js编译结果执行缓存,这意味着当相同内容多次运行时,可以跳过编译,并且后续运行将更快地加载。 因此,我们同时显示 了Firefox的 冷 (首次运行)和 热 (随后运行并从缓存加载asm.js的 运行)的 数字 :
一些发现: (Some findings:)
-
Firefox 42 64-bit is currently the fastest shipping browser in most of the benchmarks. The 32-bit version of Firefox is noticeably slower than the 64-bit version.
在大多数基准测试中,Firefox 42 64位是目前最快的浏览器。 Firefox的32位版本明显比64位版本慢。
-
Edge, as a new contender in these benchmarks comes in second, with results close to Firefox (and actually faster the Firefox 32-bit) in most benchmarks. In benchmarks which stress WebGL rendering performance (Particles, Asteroid Field), Edge performs best of all tested browsers.
Edge作为这些基准测试中的新竞争者排在第二位,在大多数基准测试中,结果都接近Firefox(实际上比Firefox 32位更快)。 在强调WebGL渲染性能(基准,Asteroid Field)的基准测试中,Edge在所有经过测试的浏览器中均表现最佳。
-
Safari delivers performance comparable to Chrome, up from a year ago when it was significantly slower than Chrome.
Safari的性能可与Chrome媲美,而一年前的速度明显慢于Chrome。
-
Internet Explorer 11 is far behind the pack in just about everything, and is too slow to be of much use running Unity WebGL content.
Internet Explorer 11在几乎所有方面都远远落后于软件包,并且运行速度太慢,无法运行Unity WebGL内容。
-
Our Unity build with Shared Array Buffers significantly improves performance (by several times in some of the benchmarks). This gives an outlook of future performance gains to expect.
我们的带有共享阵列缓冲区的Unity构建显着提高了性能(在某些基准测试中提高了几倍)。 这给出了预期的未来性能提升的前景。
-
Overall, in Firefox, we are seeing an 18% performance increase compared to our results from one year ago. Some of this is attributable to Firefox 41 running faster than Firefox 32, the bigger difference seems to come from improvements in Unity and the emscripten compiler. These results are from OS X, where Firefox has been 64-bit for a long time. On Windows, the improvement since last year will be better, due to the arrival of 64-bit Firefox builds.
总体而言,在Firefox中,与一年前相比,我们看到的性能提高了18%。 部分原因是Firefox 41的运行速度比Firefox 32快,最大的不同似乎来自Unity和emscripten编译器的改进。 这些结果来自OS X,而Firefox长期以来一直是64位的。 在Windows上,由于64位Firefox版本的出现,自去年以来的改进将会更好。
-
Looking at load times, most modern browsers are able to load the benchmark project in between 5 and 7 seconds. Firefox is able to cache asm.js compilation, which brings subsequent loads down to 1.5-2 seconds.
从加载时间来看,大多数现代浏览器都能够在5到7秒之间加载基准项目。 Firefox能够缓存asm.js编译,从而使后续加载降低到1.5-2秒。
翻译自: https://blogs.unity3d.com/2015/12/15/updated-webgl-benchmark-results/
webgl测试