diff options
| author | Paolo Bonzini <pbonzini@redhat.com> | 2025-09-16 18:07:57 +0200 |
|---|---|---|
| committer | Dylan Baker <dylan@pnwbakers.com> | 2025-09-22 08:34:09 -0700 |
| commit | 0bb366b36131967579826d92f0733c301fd59565 (patch) | |
| tree | d0d9264baa252e9a4ebaa00031590590d0d2e14c /docs/markdown | |
| parent | 8b3c6c9fb4b27c1a5635d2b498275ed2eb326a8f (diff) | |
| download | meson-0bb366b36131967579826d92f0733c301fd59565.tar.gz | |
utils, backends: add and use unique_list
backends.py has an interesting idiom for keeping the unique
elements of a list. This is much faster than OrderedSet:
* dict.fromkeys() vs. OrderedSet.__init__(): 35% faster on Python
3.13, 50-60% faster on Python 3.10
* list(d) (d is a dict) vs. list(os) (os is an OrderedSet): up to
25% faster on Python 3.13, up to 15% faster on Python 3.10
though it tapers out after a few hundred elements.
Add a function to mesonlib to encapsulate this idiom.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'docs/markdown')
0 files changed, 0 insertions, 0 deletions
