DescriptionMake HTMLSlotElement.distributedNodeNextTo & distributedNodePreviousTo faster
Currently distributedNodeNextTo & distributedNodePreviousTo are calculated using vector (O(N)). This CL makes this calculation O(1) by introducing a hashmap.
According to Performance Test, the calculation became 7.7% faster, in case of N=1000. (N being the number of distributed nodes)
With this CL: avg 79094.69485003888 runs/s
Without this CL: avg 73466.4783609413 runs/s
BUG=531990
Committed: https://crrev.com/429b5ee96832287dd7c0747e6115227ac2447b31
Cr-Commit-Position: refs/heads/master@{#372632}
Patch Set 1 #Patch Set 2 : Remove an unintended change #Patch Set 3 : Add Performance Test #
Total comments: 18
Patch Set 4 : Clean up code #
Total comments: 1
Messages
Total messages: 16 (6 generated)
|