Repository navigation
Misc fixes - #397
Draft
skirpichev wants to merge 21 commits into
Draft
Misc fixes#397skirpichev wants to merge 21 commits into
skirpichev wants to merge 21 commits into
Conversation
1<<300: Mean +- std dev: [ref] 7.65 us +- 0.23 us -> [patch] 7.16 us +- 0.12 us: 1.07x faster -(1<<300): Mean +- std dev: [ref] 7.58 us +- 0.11 us -> [patch] 7.15 us +- 0.11 us: 1.06x faster 1<<3000: Mean +- std dev: [ref] 24.6 us +- 0.2 us -> [patch] 20.9 us +- 0.1 us: 1.18x faster -(1<<3000): Mean +- std dev: [ref] 24.6 us +- 0.5 us -> [patch] 20.9 us +- 0.2 us: 1.18x faster 1<<10000: Mean +- std dev: [ref] 69.0 us +- 0.1 us -> [patch] 56.8 us +- 0.2 us: 1.22x faster -(1<<10000): Mean +- std dev: [ref] 69.2 us +- 0.4 us -> [patch] 57.0 us +- 1.3 us: 1.21x faster Benchmark hidden because not significant (4): 1<<7, -(1<<7), 1<<38, -(1<<38) Geometric mean: 1.09x faster
dumps(mpz(1<<7)): Mean +- std dev: [ref] 30.1 us +- 0.3 us -> [patch] 28.9 us +- 0.2 us: 1.04x faster loads(< (1<<7) >): Mean +- std dev: [ref] 15.2 us +- 0.2 us -> [patch] 14.6 us +- 0.2 us: 1.04x faster dumps(mpz(-(1<<7))): Mean +- std dev: [ref] 31.0 us +- 0.2 us -> [patch] 29.1 us +- 0.2 us: 1.06x faster loads(< (-(1<<7)) >): Mean +- std dev: [ref] 16.4 us +- 0.2 us -> [patch] 14.7 us +- 0.2 us: 1.12x faster dumps(mpz(1<<38)): Mean +- std dev: [ref] 30.0 us +- 0.2 us -> [patch] 29.0 us +- 0.2 us: 1.03x faster loads(< (1<<38) >): Mean +- std dev: [ref] 15.2 us +- 0.2 us -> [patch] 14.6 us +- 0.2 us: 1.04x faster dumps(mpz(-(1<<38))): Mean +- std dev: [ref] 31.0 us +- 0.3 us -> [patch] 29.2 us +- 0.3 us: 1.06x faster loads(< (-(1<<38)) >): Mean +- std dev: [ref] 16.4 us +- 0.2 us -> [patch] 14.7 us +- 0.2 us: 1.12x faster dumps(mpz(1<<300)): Mean +- std dev: [ref] 30.3 us +- 0.2 us -> [patch] 29.0 us +- 0.2 us: 1.05x faster loads(< (1<<300) >): Mean +- std dev: [ref] 15.7 us +- 0.2 us -> [patch] 14.6 us +- 0.2 us: 1.08x faster dumps(mpz(-(1<<300))): Mean +- std dev: [ref] 32.1 us +- 0.2 us -> [patch] 29.2 us +- 0.2 us: 1.10x faster loads(< (-(1<<300)) >): Mean +- std dev: [ref] 17.5 us +- 0.2 us -> [patch] 14.8 us +- 0.2 us: 1.19x faster dumps(mpz(1<<3000)): Mean +- std dev: [ref] 34.1 us +- 0.2 us -> [patch] 29.1 us +- 0.3 us: 1.17x faster loads(< (1<<3000) >): Mean +- std dev: [ref] 20.2 us +- 0.2 us -> [patch] 15.3 us +- 0.2 us: 1.32x faster dumps(mpz(-(1<<3000))): Mean +- std dev: [ref] 36.0 us +- 0.3 us -> [patch] 29.5 us +- 0.3 us: 1.22x faster loads(< (-(1<<3000)) >): Mean +- std dev: [ref] 22.6 us +- 0.2 us -> [patch] 15.6 us +- 0.2 us: 1.45x faster dumps(mpz(1<<10000)): Mean +- std dev: [ref] 44.5 us +- 0.2 us -> [patch] 30.1 us +- 0.2 us: 1.48x faster loads(< (1<<10000) >): Mean +- std dev: [ref] 32.3 us +- 0.2 us -> [patch] 17.0 us +- 0.2 us: 1.89x faster dumps(mpz(-(1<<10000))): Mean +- std dev: [ref] 46.7 us +- 0.2 us -> [patch] 31.0 us +- 0.2 us: 1.51x faster loads(< (-(1<<10000)) >): Mean +- std dev: [ref] 34.2 us +- 0.2 us -> [patch] 17.6 us +- 0.2 us: 1.94x faster Geometric mean: 1.22x faster
This reverts commit b01feb8.
This excercise fast path, that might be used for pickling.
skirpichev
marked this pull request as draft
December 4, 2026 07:53
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PyMem_*functions for allocation__reduce_ex__/_from_bytes()