Optimize the speed of should().beEqualToArray() |
||
Issue descriptionAs shown in https://bugs.chromium.org/p/chromium/issues/detail?id=703226#c4, we can optimize the speed of should().beEqualToArray() by the factor of 4. let actual = this._actual; let expected = this._expected; for (let index = 0; index < actual.length; index++) { if (actual[index] != expected[index]) errorIndices.push(index); }
,
Mar 24 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/fad633b5888c53d2cf46b6c4ec2eb7d196f7ad3f commit fad633b5888c53d2cf46b6c4ec2eb7d196f7ad3f Author: hongchan <hongchan@chromium.org> Date: Fri Mar 24 14:58:23 2017 Optimize the speed of array iteration in Audit Some array iterations in Audit are using the new for(..in..) syntax, which is much slower than the regular for () loop. This CL replaces all instances of for(..in..) against array with for(). BUG= 704652 Review-Url: https://codereview.chromium.org/2775713002 Cr-Commit-Position: refs/heads/master@{#459423} [modify] https://crrev.com/fad633b5888c53d2cf46b6c4ec2eb7d196f7ad3f/third_party/WebKit/LayoutTests/webaudio/resources/audit.js
,
Mar 24 2017
|
||
►
Sign in to add a comment |
||
Comment 1 by hongchan@chromium.org
, Mar 23 2017