forked from python/cpython
-
Notifications
You must be signed in to change notification settings - Fork 0
[pull] main from python:main #566
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
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
When a `str` is encoded in `bytearray.__init__` the encoder tends to
create a new unique bytes object. Rather than allocate new memory and
copy the bytes use the already created bytes object as bytearray
backing. The bigger the `str` the bigger the saving.
Mean +- std dev: [main_encoding] 497 us +- 9 us -> [encoding] 14.2 us +- 0.3 us: 34.97x faster
```python
import pyperf
runner = pyperf.Runner()
runner.timeit(
name="encode",
setup="a = 'a' * 1_000_000",
stmt="bytearray(a, encoding='utf8')")
```
…stent module name given to `create_builtin()` (#142054) Co-authored-by: Brett Cannon <brett@python.org> Co-authored-by: Victor Stinner <vstinner@python.org>
Signed-off-by: yihong0618 <zouzou0208@gmail.com>
Co-Authored-By: Paul Ross <apaulross@gmail.com> Co-Authored-By: Carol Willing <carolcode@willingconsulting.com> Co-Authored-By: Hugo van Kemenade <hugovk@users.noreply.github.com> Co-Authored-By: Ezio Melotti <ezio.melotti@gmail.com> Co-Authored-By: Adam Turner <9087854+aa-turner@users.noreply.github.com>
* WIP: ENH: Pixi package definitions for downstream development [skip ci] * linux-64 support * tidy gitignore * respond to review - switch cases on `PYTHON_VARIANT` - remove `minor_version` by using `python3` - remove runtime-only asan options * README updates * use `.md` to preview rendering * Apply suggestions from code review Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> * Apply suggestion from @FFY00 Co-authored-by: Filipe Laíns <filipe.lains@gmail.com> * Apply suggestion from @FFY00 Co-authored-by: Filipe Laíns <filipe.lains@gmail.com> * Apply suggestion from @FFY00 Co-authored-by: Filipe Laíns <filipe.lains@gmail.com> * Apply suggestion from @lucascolley --------- Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Co-authored-by: Filipe Laíns <filipe.lains@gmail.com>
…-142711) Signed-off-by: Manjusaka <me@manjusaka.me> Co-authored-by: Ken Jin <kenjin4096@gmail.com>
…H-142712) Co-authored-by: Ken Jin <kenjin4096@gmail.com>
This combines most _PyStackRef functions and macros between the free threaded and default builds. - Remove Py_TAG_DEFERRED (same as Py_TAG_REFCNT) - Remove PyStackRef_IsDeferred (same as !PyStackRef_RefcountOnObject)
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )
📚 Documentation preview 📚: https://cpython-previews--566.org.readthedocs.build/