Yegor 202eb2a495 Use Float32List as Matrix storage inside the Web engine (flutter/engine#17856)
This change converts all Float64List matrices to Float32List at the dart:ui interface boundary. Internally, it only uses Float32List. Float32List requires less memory and is orders of magnitude faster to allocate, and it has sufficient precision as Flutter mobile engine and Skia use 32-bit floats anyway.

This change speeds up frame preroll by 50% on the bench_card_infinite_scroll benchmark.

For more details on Float64Array allocation in JS (which backs Float64List in Dart) see the following:

https://bugs.chromium.org/p/v8/issues/detail?id=9199
https://bugs.chromium.org/p/v8/issues/detail?id=2022
2020-04-22 11:08:23 -07:00
Languages
Dart 75%
C++ 16.5%
Objective-C++ 2.9%
Java 2.8%
Objective-C 0.7%
Other 1.9%