Skip to content

MICROPY_QSTR_BYTES_IN_HASH performance/size tradeoff #10151

@dhalbert

Description

@dhalbert

MICROPY_QSTR_BYTES_IN_HASH says how many bytes to reserve for a qstr hash. Typical values are 0, 1, 2.

MicroPython uses 0 for the smallest builds causing a few % penalty in performance. See micropython#12835. MicroPython uses 2 for builds that are not cramped for space, and 1 for others.

CircuitPython uses 1 for everything.

Trinket build delta
0: -640
1: 0 (default)
2: +664

So changing to 0 for tiny builds will get us some extra space, if we need it in the future. I haven't seen a performance chart for 1 vs 2. We could consider 2 for some builds.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions

    pFad - Phonifier reborn

    Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

    Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


    Alternative Proxies:

    Alternative Proxy

    pFad Proxy

    pFad v3 Proxy

    pFad v4 Proxy