scripts: get_abi.pl: precompile what match regexes
authorMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Thu, 23 Sep 2021 15:41:18 +0000 (17:41 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 23 Sep 2021 16:45:08 +0000 (18:45 +0200)
commitf34f67292b5aab7907ec7a694d5733dbc1593b3b
tree5f45c57aa9fe4c699f56fca3a92937a9b24e5740
parentcb06b8ddeb4790cb6caf744316ebea99d53996ee
scripts: get_abi.pl: precompile what match regexes

In order to earn some time during matches, pre-compile regexes.

Before this patch:
$ time ./scripts/get_abi.pl undefined |wc -l
6970

real 0m54,751s
user 0m54,022s
sys 0m0,592s

Afterwards:

$ time ./scripts/get_abi.pl undefined |wc -l
6970

real 0m5,888s
user 0m5,310s
sys 0m0,562s

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Link: https://lore.kernel.org/r/ec45de8fcae791aab0880644974a110424423e68.1632411447.git.mchehab+huawei@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
scripts/get_abi.pl