That looks something like this for a small grid where our snake is moving down. Notice that we delete and re-print 3 entire lines!
The duration to apply the DOM changes dropped by 45% when we were able to remove JS glue code. DOM operations can already be expensive; WebAssembly users can’t afford to pay a 2x performance tax on top of that. And as this experiment shows, it is possible to remove the overhead.
。Line官方版本下载对此有专业解读
Mat Smith for Engadget
Фото: Pierre Albouy / Reuters