3 ms·
Servo is a layout engine but the benchmarks are mostly testing javascript performance. Extra cpu cores are not going to speed up JS benchmarks, not because JS i
by guelo 9y ago
Servo is a layout engine but the benchmarks are mostly testing javascript performance. Extra cpu cores are not going to speed up JS benchmarks, not because JS is single-threaded but because the benchmarks themselves have to be designed to test multiple threads. The same would be true if the benchmarks were written in C, if you want to test multithreading you have to write code to do it. Javascript benchmarks could test multithreading via Web Workers but for whatever reasons they don't seem to.
- the8472 9y agobrowser benchmarks could test more than javascript execution. dom layout, canvas rendering, scrolling etc. Some of those things can benefit from multiple threads even if JS is single-threaded. Allocation-heavy workloads will also benefit from concurrent and parallel GC implementations.
- bhauer 9y ago> Javascript benchmarks could test multithreading via Web Workers but for whatever reasons they don't seem to. Well, like I said, JavaScript has a long history and therefore a predilection for single-threading. Yes, you could write tests that exercise Web Workers, but Web Workers are still infrequently used in the wild, let alone in benchmarking suites. I've used Web Workers in a few projects and I'm underwhelmed by their current features. I can't really blame the JavaScript community at large for not using them much yet. The DOM and other elements of browsers also have single-threaded assumptions or behaviors. More multi-threaded capability is a first step, and then we'll need to take advantage of that capability.