Hash :
5446e87e
Author :
Date :
2023-07-24T16:46:56
Improve ProgramExecutable::load performance We are calling push_back for each vector inside ProgramExecutable. This causes c++ run time to constantly re-allocate storage and copy the vector over to new storage, and impacts performance negatively. Since the vector size is know when we load program from cache, this CL calls resize to the correct size first and then update each element as we walk over, thus reduces the vector storage reallocation. This CL reduces blade_and_soul_revolution frame time from 4.48 ms to 4.35 ms on pixel 7 pro. This CL also changes ProgramBinaryTest tests to use slightly more complicated program instead of the simplest program. Bug: b/275102061 Change-Id: I8d92117b07a9ad2d0851850e473ea1b86f9868f8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4713685 Reviewed-by: Roman Lavrov <romanl@google.com> Commit-Queue: Charlie Lao <cclao@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>