diff options
author | Guido Cella <guido@guidocella.xyz> | 2023-12-26 19:40:41 +0100 |
---|---|---|
committer | sfan5 <sfan5@live.de> | 2023-12-26 20:12:24 +0100 |
commit | 19a37f625fcd502acea42b4f27029c8be724d40c (patch) | |
tree | 8dfcb4ccf8dd76e287c41a7108c57527bcf52fa1 /sub | |
parent | 4d7763e6a65a2020aba505e378e83f49648bfa24 (diff) | |
download | mpv-19a37f625fcd502acea42b4f27029c8be724d40c.tar.bz2 mpv-19a37f625fcd502acea42b4f27029c8be724d40c.tar.xz |
console.lua: refactor find_common_prefix
Reuse common_prefix_length() to make find_common_prefix() shorter and
faster by not creating many temporary strings.
The decrease in the average time to run find_common_prefix() over 1000
calls I measured is:
set \<Tab>: 1e-4s -> 1e-5s
set s\Tab>: 1e-5s -> 5e-6s
Diffstat (limited to 'sub')
0 files changed, 0 insertions, 0 deletions