aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/scripts/dist.py
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2019-04-22 15:43:03 -0700
committerDylan Baker <dylan@pnwbakers.com>2019-04-25 12:28:51 -0700
commit8e1670cc60cc853c7ddc81dceb65dc93fa45bfa9 (patch)
treec6d8ce493fad51f895027b85db44a7e0a746e459 /mesonbuild/scripts/dist.py
parent346ab9f0d85122ca50f4051d0aedbcf7f3234cdb (diff)
downloadmeson-8e1670cc60cc853c7ddc81dceb65dc93fa45bfa9.zip
meson-8e1670cc60cc853c7ddc81dceb65dc93fa45bfa9.tar.gz
meson-8e1670cc60cc853c7ddc81dceb65dc93fa45bfa9.tar.bz2
rewriter: optimize the list_to_dict function
This uses an iterator instead of walking a list, which is roughly twice as fast. This also does away with the pre-check on whether the list is valid for converting to a dict, and instead handles the case of an uneven number by catching another exception. This is preferable since it's a fatal error anyway, so avoiding it in the non-fatal case is preferable.
Diffstat (limited to 'mesonbuild/scripts/dist.py')
0 files changed, 0 insertions, 0 deletions