Uh oh!
There was an error while loading. Please reload this page.
gh-131798: JIT: Narrow the return type of _BINARY_SLICE to original container type - #133527
gh-131798: JIT: Narrow the return type of _BINARY_SLICE to original container type#133527Zheaoli wants to merge 1 commit into
Conversation
…inal container type Signed-off-by: Manjusaka <me@manjusaka.me>
brandtbucher
commented
May 6, 2025
@Zheaoli, I appreciate you taking the time to do this, but somebody else is already working on Is it okay if we close this? FYI, one issue I see here is that there is no guarantee that slicing an arbitrary object will give you the same class (we need to check for some common classes instead): >>>importmmap>>>mm=mmap.mmap(-1, 42)
>>> type(mm)
<class'mmap.mmap'>>>>type(mm[:])
<class'bytes'> |
Zheaoli
commented
May 7, 2025
Sorry about this! I have not noticed this has been assigned. |
Zheaoli
commented
May 7, 2025
Sure! |
Zheaoli
commented
May 7, 2025
Thanks about the explain. You prove one of my guess. |
I'm not sure this patch will take some effect.
In my original thought, I think if we can setup the return type to the original container type(tuple, list etc.), the optimizer will specialize some code in the test.
but the test is not work on my thought. I guess I miss something important here. cc @brandtbucher@Fidget-Spinner