Optimize some startup code related to about:flags handling.
Previously, the code would create a set from all the known flags and compare the specified flags against them. But actually this is less efficient than just the O(n*m) search, because n being the number of flags set by the user and m being the number of available flags, since n will likely be small or 0 and then we don't need to do a lot of work. In particular, this also avoids copying a bunch of strings. Bug: 904575 Change-Id: I63e59d439c432338aea71eb6258e8f8b42f04921 Reviewed-on: https://chromium-review.googlesource.com/c/1334413 Commit-Queue: Alexei Svitkine <asvitkine@chromium.org> Reviewed-by:ssid <ssid@chromium.org> Cr-Commit-Position: refs/heads/master@{#608128}
Showing
Please register or sign in to comment