From cad608108b54c8996b005a39ab9c380cc19c458d Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Mon, 29 Jan 2024 14:36:48 -0800 Subject: [PATCH] interpreter: don't use `in dict.keys()` use `in dict` The former performs a linear search, which is slower than the set based search. --- mesonbuild/interpreter/interpreter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mesonbuild/interpreter/interpreter.py b/mesonbuild/interpreter/interpreter.py index dd73522a0..04fa67a95 100644 --- a/mesonbuild/interpreter/interpreter.py +++ b/mesonbuild/interpreter/interpreter.py @@ -1127,7 +1127,7 @@ class Interpreter(InterpreterBase, HoldableObject): return from ..backend import backends - if OptionKey('genvslite') in self.user_defined_options.cmd_line_options.keys(): + if OptionKey('genvslite') in self.user_defined_options.cmd_line_options: # Use of the '--genvslite vsxxxx' option ultimately overrides any '--backend xxx' # option the user may specify. backend_name = self.coredata.get_option(OptionKey('genvslite'))