Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: RustPython/RustPython
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: giammirove/RustPython
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 3 commits
  • 1 file changed
  • 1 contributor

Commits on Aug 18, 2025

  1. fast-path hash() for exact PyStr

    str.__hash__ can’t be overridden, so for exact PyStr instances we
    skip the attribute lookup and MRO walk and call the string hash directly.
    This reduces overhead on hot paths (e.g. dict/set key hashing) while keeping
    subclass semantics intact (downcast_ref_if_exact).
    giammirove committed Aug 18, 2025
    Configuration menu
    Copy the full SHA
    41a956a View commit details
    Browse the repository at this point in the history

Commits on Aug 20, 2025

  1. avoid get_class_attr for __hash__; read hash slot via mro_find_map

    Reduce calls and lock acquisitions on hot paths by bypassing get_class_attr(__hash__) and directly resolving the hash implementation with mro_find_map(|cls| cls.slots.hash.load()).
    giammirove committed Aug 20, 2025
    Configuration menu
    Copy the full SHA
    6a29c4c View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    32c74b8 View commit details
    Browse the repository at this point in the history
Loading