4 ms·
Edit: the particular quote I objected to was edited out by parent. I object to "all the dynamicness of the rest of the JS is what V8 excels at". V8 excels at a
by sanxiyn 13y ago
Edit: the particular quote I objected to was edited out by parent.
I object to "all the dynamicness of the rest of the JS is what V8 excels at". V8 excels at a subset of dynamic JavaScript (namely those benefit from Crankshaft) and is not very good outside of the subset.
Typescript benchmark included in Octane benchmark suite is a good example. In Google's own words: "This test measures the time TypeScript takes to compile itself and is a proxy of how well a VM handles complex and sizable Javascript applications".
In particular, Crankshaft is not effective for this benchmark. (Check yourself by running it with Crankshaft disabled: the score actually improves because you save compilation effort.) And as you can check yourself or check on AreWeFastYet, JavaScriptCore beats V8 by 2x on this benchmark.
I admit Crankshaft subset of JavaScript is large and interesting (certainly compared to asm.js subset) but it is not true that V8 excels at dynamic JavaScript, for sufficiently large value of dynamic. JavaScriptCore does.
- mantrax5 13y agoNoted. Sorry for removing this, I indeed said that, but I thought it's redundant so I removed it.
- mraleph 13y agoTypeScript benchmark is one of the Octane benchmarks that does not do warm up, so Crankshaft does not have chance to fully shine [which is totally fair given how TypeScript compiler is used: you don't warm it up, you just spawn it again and again]. It also has an extremely flat profile. So you can't simply say that "Crankshaft is not effective for it". Though potentially you can say "benefits of Crankshafting do not compensate for the cost of Crankshafting". If you enable warmup for it then score jumps by a factor of 2 for V8. JSC might be warming faster or simply have a better cost / benefit ratio at lower tiers. I doubt FTL kicks at all for this benchmark given how short running it is. V8 also deopts quite a bit on it, so it might be some pathological case... This is definitely something worth exploring and fixing on V8 side.
- zurn 13y ago> V8 excels at a subset of dynamic JavaScript (namely those benefit from Crankshaft) and is not very good outside of the subset As I understand it Crankshaft's claim to fame is the runtime type specialization, which does well if the code is hot and ends up using same types in all cases. Is this what you are referring to?