checkpatch: improve runtime execution speed a little
checkpatch repeatedly uses a runtime minimum version check that validates
the minimum perl version required for a regex match by using a "$^V ge
5.10.0" runtime string match.
Only perform that minimum version test once and store the result to reduce
string matching time.
This reduces runtime execution time for patches or files with high line
An example runtime improvement:
new: $ time ./scripts/checkpatch.pl -f drivers/net/ethernet/intel/i40e/i40e_main.c > /dev/null
old: $ time ./scripts/checkpatch.pl -f drivers/net/ethernet/intel/i40e/i40e_main.c > /dev/null
Signed-off-by: Joe Perches <firstname.lastname@example.org>
Signed-off-by: Andrew Morton <email@example.com>
1 file changed