[issue41493] Refactoring dictresize to accept only new keysize

2020-08-06 Thread Inada Naoki
Inada Naoki added the comment: New changeset d9323a8c6e07071a59dc4c910661db33236c01b2 by Inada Naoki in branch 'master': bpo-41493: Refactoring dictresize (GH-21751) https://github.com/python/cpython/commit/d9323a8c6e07071a59dc4c910661db

[issue41493] Refactoring dictresize to accept only new keysize

2020-08-06 Thread Inada Naoki
Change by Inada Naoki : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue41497] Potential UnicodeDecodeError in dis

2020-08-06 Thread Inada Naoki
Change by Inada Naoki : -- versions: -Python 3.5, Python 3.6, Python 3.7 ___ Python tracker <https://bugs.python.org/issue41497> ___ ___ Python-bugs-list mailin

[issue39871] math.copysign raises SystemError with non-float x and custom y

2020-08-06 Thread Inada Naoki
Inada Naoki added the comment: New changeset 54636355805dd2877bb54fbad8d967e1ddd8b553 by Zackery Spytz in branch 'master': bpo-39871: Fix an error in a news entry (GH-21749) https://github.com/python/cpython/commit/54636355805dd2877bb54fbad8d967e1ddd8b553 -- nosy: +i

[issue41098] Deprecating PyUnicodeEncodeError_Create

2020-08-07 Thread Inada Naoki
Inada Naoki added the comment: New changeset 46e19b61d31ba99f049258efa4ff1334856a3643 by Inada Naoki in branch 'master': bpo-41098: Doc: Add missing deprecated directives (GH-21162) https://github.com/python/cpython/commit/46e19b61d31ba99f049258efa4ff13

[issue41497] Potential UnicodeDecodeError in dis

2020-08-07 Thread Inada Naoki
Inada Naoki added the comment: New changeset a4084b9d1e40c1c9259372263d1fe8c8a562b093 by Konge in branch 'master': bpo-41497: Fix potential UnicodeDecodeError in dis CLI (GH-21757) https://github.com/python/cpython/commit/a4084b9d1e40c1c9259372263d1fe8c8a562b093 -

[issue41507] Use utf-8 in "Reading and Writing Files" tutorial.

2020-08-07 Thread Inada Naoki
New submission from Inada Naoki : https://docs.python.org/3/tutorial/inputoutput.html#reading-and-writing-files Current tutorial doesn't mention about encoding and example uses locale encoding. Since UTF-8 is major text encoding and many Windows environment doesn't use UTF-8

[issue41497] Potential UnicodeDecodeError in dis

2020-08-07 Thread Inada Naoki
Change by Inada Naoki : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue39102] Increase Enum performance

2020-08-09 Thread Inada Naoki
Change by Inada Naoki : -- nosy: +inada.naoki ___ Python tracker <https://bugs.python.org/issue39102> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41692] Deprecate immortal interned strings: PyUnicode_InternImmortal()

2020-09-02 Thread Inada Naoki
Inada Naoki added the comment: +1 -- ___ Python tracker <https://bugs.python.org/issue41692> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41698] io.[Text]IOBase.seek doesn't take keyword parameter - revisited

2020-09-02 Thread Inada Naoki
Inada Naoki added the comment: Since we have positional-only argument, can we document it as `seek(offset, whence=SEEK_SET, /)`? -- ___ Python tracker <https://bugs.python.org/issue41

[issue41698] io.[Text]IOBase.seek doesn't take keyword parameter - revisited

2020-09-02 Thread Inada Naoki
Inada Naoki added the comment: For the record, https://github.com/python/cpython/pull/14691/files reintroduced `whence=SEEK_SET`. -- nosy: +inada.naoki ___ Python tracker <https://bugs.python.org/issue41

[issue41784] Promote PyUnicode_AsUTF8AndSize to be available with the limited API (PEP 384)

2020-09-14 Thread Inada Naoki
Inada Naoki added the comment: +1. It is a very important API. -- ___ Python tracker <https://bugs.python.org/issue41784> ___ ___ Python-bugs-list mailin

[issue41784] Promote PyUnicode_AsUTF8AndSize to be available with the limited API (PEP 384)

2020-09-14 Thread Inada Naoki
Change by Inada Naoki : -- versions: +Python 3.10 ___ Python tracker <https://bugs.python.org/issue41784> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41784] Promote PyUnicode_AsUTF8AndSize to be available with the limited API (PEP 384)

2020-09-15 Thread Inada Naoki
Inada Naoki added the comment: PyUnicode_AsUTF8 is useful "API". But it can be implemented as C macro, C inline function, or functions/macros in any other languages using PyUnicode_AsUTF8AndSize. PyUnicode_AsUTF8AndSize is more importan

[issue41835] Speed up dict vectorcall creation using keywords

2020-09-22 Thread Inada Naoki
Inada Naoki added the comment: I have a Linux desktop machine for benchmarking & profiling in my office. But the machine is offline and I am working from home several weeks. So please wait several weeks until I confirm your branch. > This change speeds up the code up to a 30%. Test

[issue33235] Better help text for dict.setdefault

2020-10-03 Thread Inada Naoki
Change by Inada Naoki : -- resolution: -> out of date stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue33235> ___ ___

[issue41894] UnicodeDecodeError during load failure in non-UTF-8 locale

2020-10-05 Thread Inada Naoki
Inada Naoki added the comment: I succeeded to reproduce it on Ubuntu 20.04. $ sudo vi /var/lib/locales/supported.d/ja # add "ja_JP.EUC-JP EUC-JP" $ sudo locale-gen ja_JP.EUC-JP Generating locales (this might take a while)... ja_JP.EUC-JP... done Generatio

[issue35291] duplicate of memoryview from io.BufferedWriter leaks

2020-10-05 Thread Inada Naoki
Change by Inada Naoki : -- resolution: -> out of date stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue35291> ___ ___

[issue32222] pygettext doesn't extract docstrings for functions with type annotated params

2020-10-05 Thread Inada Naoki
Change by Inada Naoki : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue41894] UnicodeDecodeError during load failure in non-UTF-8 locale

2020-10-07 Thread Inada Naoki
Inada Naoki added the comment: > I have since changed the PR to use PyUnicode_DecodeFSDefault based on review > feedback. I was going to say that you will have to fight it out with @methane > on GH, but I see that that's you. :D Would have been nice if you would have >

[issue41376] site.getusersitepackages() incorrectly claims that PYTHONNOUSERSITE is respected

2020-10-07 Thread Inada Naoki
Inada Naoki added the comment: New changeset 35f041dd0171f575fc3adce1709b31fdf45a5ff6 by Phil Elson in branch 'master': bpo-41376: Fix the documentation of `site.getusersitepackages()` (GH-21602) https://github.com/python/cpython/commit/35f041dd0171f575fc3adce1709b31

[issue41894] UnicodeDecodeError during load failure in non-UTF-8 locale

2020-10-08 Thread Inada Naoki
Inada Naoki added the comment: > I think that it is more correct to use the locale encoding. If error messages > are translated for readability, we should not ruin this by outputting \xXX. * PyUnicode_DecodeLocale() doesn't support "backslashescape" error handler. * Err

[issue41894] UnicodeDecodeError during load failure in non-UTF-8 locale

2020-10-08 Thread Inada Naoki
Inada Naoki added the comment: > So the main problem is: should we allow surrogateescape in error message? Note that error message may be written to file, stream, structured log (JSON). They may be UTF-8:strict. We can not write surrogateescape-d string to t

[issue41894] UnicodeDecodeError during load failure in non-UTF-8 locale

2020-10-08 Thread Inada Naoki
Inada Naoki added the comment: OK. Let's use PyUnicode_DecodeLocale() with surrogateescape for consistency. -- ___ Python tracker <https://bugs.python.org/is

[issue41894] UnicodeDecodeError during load failure in non-UTF-8 locale

2020-10-08 Thread Inada Naoki
Inada Naoki added the comment: Yes, please. -- ___ Python tracker <https://bugs.python.org/issue41894> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41894] UnicodeDecodeError during load failure in non-UTF-8 locale

2020-10-14 Thread Inada Naoki
Inada Naoki added the comment: New changeset 2d2af320d94afc6561e8f8adf174c9d3fd9065bc by Kevin Adler in branch 'master': bpo-41894: Fix UnicodeDecodeError while loading native module (GH-22466) https://github.com/python/cpython/commit/2d2af320d94afc6561e8f8adf174c9

[issue41894] UnicodeDecodeError during load failure in non-UTF-8 locale

2020-10-14 Thread Inada Naoki
Inada Naoki added the comment: Thank you for finding/fixing. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue42039] Add gc.track and gc.untrack

2020-10-14 Thread Inada Naoki
Inada Naoki added the comment: There are many code that an object is tracked/untracked. This API can cause fatal error too easily. I think this API should be exposed only in _testcapi. -- nosy: +methane ___ Python tracker <https://bugs.python.

[issue42030] Drop support for dynload_aix

2020-10-14 Thread Inada Naoki
Change by Inada Naoki : -- nosy: +David.Edelsohn ___ Python tracker <https://bugs.python.org/issue42030> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42030] Drop support for dynload_aix

2020-10-14 Thread Inada Naoki
Change by Inada Naoki : -- nosy: +Michael.Felt ___ Python tracker <https://bugs.python.org/issue42030> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42039] Add gc.track and gc.untrack

2020-10-15 Thread Inada Naoki
Inada Naoki added the comment: I meant this: https://github.com/python/cpython/blob/b67cbbda3a022cec5e2ad929f0531162166e7c8d/Include/internal/pycore_object.h#L75-L78 -- ___ Python tracker <https://bugs.python.org/issue42

[issue42039] Add gc.track and gc.untrack

2020-10-15 Thread Inada Naoki
Inada Naoki added the comment: and this: https://github.com/python/cpython/blob/b67cbbda3a022cec5e2ad929f0531162166e7c8d/Include/internal/pycore_object.h#L111-L113 -- ___ Python tracker <https://bugs.python.org/issue42

[issue42039] Add gc.track and gc.untrack

2020-10-15 Thread Inada Naoki
Inada Naoki added the comment: > In my implementation, there is guards that do early return in those cases and > there are tests that check that indeed we don't crash of that happens when > calling the exposed functions The guard doesn't help much. _PyObject_GC_UNTRACK()

[issue38094] unneeded assignment to wb.len in PyBytes_Concat using buffer protocol

2020-10-16 Thread Inada Naoki
Change by Inada Naoki : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue38820] Make Python compatible with OpenSSL 3.0.0

2020-10-16 Thread Inada Naoki
Change by Inada Naoki : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue42057] pytest case which catch exceptions become segfault

2020-10-19 Thread Inada Naoki
Inada Naoki added the comment: I confirmed the issue. The simple version of the reproducer is: ``` def callee(): raise Exception def caller(): try: callee() except Exception or Exception: pass caller() ``` I can see assertion failure consisntently, when I use

[issue42057] pytest case which catch exceptions become segfault

2020-10-19 Thread Inada Naoki
Inada Naoki added the comment: I confirmed fix42057.patch fix the assertion failure. But I don't know where and how to write test yet. -- keywords: +patch Added file: https://bugs.python.org/file49527/fix42057.patch ___ Python tracker &

[issue42057] peephole optimizer bug relating to JUMP_IF_NOT_EXC_MATCH

2020-10-19 Thread Inada Naoki
Change by Inada Naoki : -- title: pytest case which catch exceptions become segfault -> peephole optimizer bug relating to JUMP_IF_NOT_EXC_MATCH ___ Python tracker <https://bugs.python.org/issu

[issue42057] peephole optimizer bug relating to JUMP_IF_NOT_EXC_MATCH

2020-10-19 Thread Inada Naoki
Change by Inada Naoki : -- pull_requests: +21759 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22802 ___ Python tracker <https://bugs.python.org/issu

[issue41902] Micro optimization for range.index if step is 1

2020-10-20 Thread Inada Naoki
Inada Naoki added the comment: New changeset 25492a5b59c5b74328278f195540e318ab87674f by Dong-hee Na in branch 'master': bpo-41902: Micro optimization for compute_item of range (GH-22492) https://github.com/python/cpython/commit/25492a5b59c5b74328278f195540e318ab87674f -

[issue23706] pathlib.Path.write_text should include a newline argument

2020-10-20 Thread Inada Naoki
Inada Naoki added the comment: Thank you -- nosy: +methane resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue38980] Compile libpython with -fno-semantic-interposition

2020-10-20 Thread Inada Naoki
Inada Naoki added the comment: +1 -- versions: +Python 3.10 -Python 3.9 ___ Python tracker <https://bugs.python.org/issue38980> ___ ___ Python-bugs-list mailin

[issue30680] textwrap should treat Unicode em-dash like ASCII em-dash

2020-10-20 Thread Inada Naoki
Inada Naoki added the comment: > Agreed. It makes great sense that textwrap started as highly ASCII-centric. > But in the Python 3, Unicode-friendly era, ASCII-biased isn't where we should > leave things. It needs Unicode experts. If we support Unicode, we should implemente

[issue30680] textwrap should treat Unicode em-dash like ASCII em-dash

2020-10-20 Thread Inada Naoki
Change by Inada Naoki : -- versions: +Python 3.10 -Python 3.7 ___ Python tracker <https://bugs.python.org/issue30680> ___ ___ Python-bugs-list mailing list Unsub

[issue41646] shutil.copy documentation should clarify support for path-like objects

2020-10-20 Thread Inada Naoki
Inada Naoki added the comment: New changeset 6443a8ccc886749f5e83a8ca073006742b605d90 by Miss Skeleton (bot) in branch '3.8': bpo-41646: Mention path-like objects support in the docs for shutil.copy() (GH-22208) https://github.com/python/cpyt

[issue41744] NuGet python.props only works in python nuget, not other variants

2020-10-20 Thread Inada Naoki
Inada Naoki added the comment: New changeset d0bfce992c4ce0e6e71f13a993c91903a97a62f3 by Miss Skeleton (bot) in branch '3.9': bpo-41744: Package python.props with correct name in NuGet package (GH-22154) https://github.com/python/cpython/commit/d0bfce992c4ce0e6e71f13a993c919

[issue41646] shutil.copy documentation should clarify support for path-like objects

2020-10-20 Thread Inada Naoki
Inada Naoki added the comment: New changeset 19019eccdeeb8dea027bd7766ca9fe2892972da4 by Miss Skeleton (bot) in branch '3.9': bpo-41646: Mention path-like objects support in the docs for shutil.copy() (GH-22208) https://github.com/python/cpyt

[issue41316] tarfile: Do not write full path in FNAME field

2020-10-21 Thread Inada Naoki
Change by Inada Naoki : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: -Python 3.5, Python 3.6, Python 3.7 ___ Python tracker <https://bugs.python.or

[issue41819] Fix some compiler warnings

2020-10-21 Thread Inada Naoki
Inada Naoki added the comment: New changeset c756c2b507b088919ac0c1aa8b0d8c8bdbdd75ee by Miss Skeleton (bot) in branch '3.8': bpo-41819: Fix compiler warning in init_dump_ascii_wstr() (GH-22332) https://github.com/python/cpython/commit/c756c2b507b088919ac0c1aa8b0d8c

[issue41819] Fix some compiler warnings

2020-10-21 Thread Inada Naoki
Change by Inada Naoki : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.8 ___ Python tracker <https://bugs.python.or

[issue42106] docs.python.org prioritises search horribly

2020-10-21 Thread Inada Naoki
Inada Naoki added the comment: Can we add search box using DuckDuckGo? https://duckduckgo.com/?q=site%3Adocs.python.org%2F3%2F+list+append -- nosy: +methane ___ Python tracker <https://bugs.python.org/issue42

[issue42057] peephole optimizer bug relating to JUMP_IF_NOT_EXC_MATCH

2020-10-21 Thread Inada Naoki
Inada Naoki added the comment: New changeset 07a44d9572c7746568a7fe2fbcd42127fd6d4019 by Inada Naoki in branch '3.9': bpo-42057: Fix peephole optimizer (GH-22802) https://github.com/python/cpython/commit/07a44d9572c7746568a7fe2fbcd421

[issue42057] peephole optimizer bug relating to JUMP_IF_NOT_EXC_MATCH

2020-10-21 Thread Inada Naoki
Change by Inada Naoki : -- pull_requests: +21820 pull_request: https://github.com/python/cpython/pull/22878 ___ Python tracker <https://bugs.python.org/issue42

[issue42057] peephole optimizer bug relating to JUMP_IF_NOT_EXC_MATCH

2020-10-21 Thread Inada Naoki
Inada Naoki added the comment: New changeset 8f6787d93db1b6022db44b1e1d22460c2b74f60b by Inada Naoki in branch '3.9': bpo-42057: Add a test case (GH-22878) https://github.com/python/cpython/commit/8f6787d93db1b6022db44b1e1d2246

[issue32431] Two bytes objects of zero length don't compare equal

2020-10-21 Thread Inada Naoki
Change by Inada Naoki : -- resolution: -> not a bug stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue42057] peephole optimizer bug relating to JUMP_IF_NOT_EXC_MATCH

2020-10-21 Thread Inada Naoki
Inada Naoki added the comment: Thank you for reporting with reproducer. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue42115] Caching infrastructure for the evaluation loop: specialised opcodes

2020-10-22 Thread Inada Naoki
Inada Naoki added the comment: FWIW, php7 is about 5x faster than Python on spectral norm benchmark. https://benchmarksgame-team.pages.debian.net/benchmarksgame/fastest/php-python3.html There two major reasons: * PHP uses scalar type for float and int * PHP uses type-specialized bytecode

[issue42115] Caching infrastructure for the evaluation loop: specialised opcodes

2020-10-22 Thread Inada Naoki
Inada Naoki added the comment: One more idea: BINARY_ADD_INT. Operand is int immediate. This idea can be implemented without opcode cache. I will try it. -- ___ Python tracker <https://bugs.python.org/issue42

[issue24165] Free list for single-digits ints

2020-10-22 Thread Inada Naoki
Change by Inada Naoki : -- pull_requests: +21823 pull_request: https://github.com/python/cpython/pull/22884 ___ Python tracker <https://bugs.python.org/issue24

[issue24165] Free list for single-digits ints

2020-10-22 Thread Inada Naoki
Inada Naoki added the comment: I updated the patch. I can not run pyperformance for now, because: AssertionError: would build wheel with unsupported tag ('cp310', 'cp310', 'linux_x86_64' I added this config, but it can not solve the problem: ``` $ cat ~/.c

[issue24165] Free list for single-digits ints

2020-10-22 Thread Inada Naoki
Inada Naoki added the comment: I heard pyperformance 1.0.0 works and here is the result of PR-22884. $ ./python-master -m pyperf compare_to master.json patched.json -G --min-speed=1 Slower (8): - pathlib: 26.3 ms +- 0.3 ms -> 26.8 ms +- 0.4 ms: 1.02x slower (+2%) - chameleon: 12.8 ms +-

[issue24165] Free list for single-digits ints

2020-10-22 Thread Inada Naoki
Inada Naoki added the comment: I had suspected that pypeformance just don't have enough workload for non-small int. For example, spectral_norm is integer heavy + some float warkload. But bm_spectral_norm uses `DEFAULT_N = 130`. So most integers are fit into smallint cache. On the

[issue41835] Speed up dict vectorcall creation using keywords

2020-10-22 Thread Inada Naoki
Change by Inada Naoki : -- keywords: +patch pull_requests: +21840 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22909 ___ Python tracker <https://bugs.python.org/issu

[issue41835] Speed up dict vectorcall creation using keywords

2020-10-22 Thread Inada Naoki
Inada Naoki added the comment: Ok. Performance improvement comes from: a. Presizing b. Bypassing some checks in PyDict_SetItem c. Avoiding duplication check. (b) is relatively small so I tried to focus on (a) and (b). See GH-22909. In case of simple keyword arguments, it is 10% faster than

[issue42126] Optimize BUILD_CONST_KEY_MAP for distinct keys

2020-10-23 Thread Inada Naoki
New submission from Inada Naoki : BUILD_CONST_KEY_MAP can be optimized based on #41835 optimization. 1. compiler checks keys tuple is distinct. 2. Add distinct flag to BUILD_CONST_KEY_MAP oparg To be considered: * Should we use new opcode, instead of flag in oparg? * Is this technique safe

[issue42126] Optimize BUILD_CONST_KEY_MAP for distinct keys

2020-10-23 Thread Inada Naoki
Change by Inada Naoki : -- keywords: +patch pull_requests: +21842 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22911 ___ Python tracker <https://bugs.python.org/issu

[issue42126] Optimize BUILD_CONST_KEY_MAP for distinct keys

2020-10-23 Thread Inada Naoki
Inada Naoki added the comment: $ ./python -m pyperf timeit --compare-to ~/pyenv/versions/3.10-dev/bin/python '{}' /home/inada-n/pyenv/versions/3.10-dev/bin/python: . 23.5 ns +- 0.2 ns /home/inada-n/work/python/cpython/python: . 22.4 ns +- 0.1

[issue42126] Optimize BUILD_CONST_KEY_MAP for distinct keys

2020-10-23 Thread Inada Naoki
Inada Naoki added the comment: It is difficult to estimate. Real world applications has different code-style than stdlib. And pyperformance didn't include whole real world applications too. Some application may use dict display in heavy loop. But it is difficult to say how much exactly.

[issue41835] Speed up dict vectorcall creation using keywords

2020-10-23 Thread Inada Naoki
Inada Naoki added the comment: @Marco Sulla Please take a look at GH-22909. It is simplified version of your PR. And I wrote another optimization based on it #42126. -- ___ Python tracker <https://bugs.python.org/issue41

[issue24165] Free list for single-digits ints

2020-10-23 Thread Inada Naoki
Inada Naoki added the comment: I close this issue for now. Please reopen or create a new issue if you came up with better idea. -- resolution: -> rejected stage: patch review -> resolved status: open -> closed versions: +Python 3.10 -P

[issue41835] Speed up dict vectorcall creation using keywords

2020-10-24 Thread Inada Naoki
Inada Naoki added the comment: @Mark.Shannon I had seen some speedup on tornado benchmark when I didn't use PGO+LTO. but it was noise. Now I use PGO+LTO. master vs PR-22909: $ ./python -m pyperf compare_to master-opt.json speedup_kw-opt.json -G --min-speed=1 Slower (11): - spectral

[issue41835] Speed up dict vectorcall creation using keywords

2020-10-24 Thread Inada Naoki
Inada Naoki added the comment: @Marco Sulla > @methane: well, to be honest, I don't see much difference between the two > pulls. The major difference is that you merged insertdict_init in > dict_merge_init. Not only it but also some simplification which make 10% faster

[issue41835] Speed up dict vectorcall creation using keywords

2020-10-24 Thread Inada Naoki
Inada Naoki added the comment: I confirmed _PyDict_FromItems() can be used to optimize _PyStack_AsDict() too. See https://github.com/methane/cpython/pull/25 But I can not confirm significant performance gain from it too. -- ___ Python tracker

[issue42141] Speedup various dict inits

2020-10-24 Thread Inada Naoki
Inada Naoki added the comment: > 1. dicts from other dicts that are not "perfect" (combined and without holes) > 3. copies of dicts with many holes Note that I have optimized and rejected it by myself already. See https://github.com/python/cpython/pull/21669 and https:/

[issue29981] Update Index for set, dict, and generator 'comprehensions'

2020-10-24 Thread Inada Naoki
Change by Inada Naoki : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: -Python 3.7 ___ Python tracker <https://bugs.python.or

[issue42141] Speedup various dict inits

2020-10-25 Thread Inada Naoki
Inada Naoki added the comment: I run pyperformance=1.0.0 for your speedup_dictinit branch (7df3b9c) and master branch, with PGO+LTO build. ``` $ ./python -m pyperf compare_to master-opt.json dictinit.json -G --min-speed=1 Slower (22): - unpack_sequence: 62.7 ns +- 0.7 ns -> 70.3 ns +- 0.5

[issue42147] Micro optimization for longrange iteration if step is 1

2020-10-25 Thread Inada Naoki
Inada Naoki added the comment: I agree that 1<<1000 is artificial example. But isn't this patch affects more regular patterns like [[] for _ in range(1)]? If we reject this, shouldn't we revert GH-22479 too? I believe iterating range object is much more common use case

[issue42147] Micro optimization for longrange iteration if step is 1

2020-10-25 Thread Inada Naoki
Inada Naoki added the comment: I had not noticed that there are rangeobject and longrangeobject. It doesn't affect to range(1) definitely. -- ___ Python tracker <https://bugs.python.org/is

[issue42147] Micro optimization for longrange iteration if step is 1

2020-10-25 Thread Inada Naoki
Inada Naoki added the comment: > On the other hand, GH-22479 is affect to all index API() whether the number > is large or small. Then, no need to revert GH-22479 for consistency. Thanks. > p.s by the way, Naoki is the last name or first name? ;) It is difficult to say what is f

[issue42147] Micro optimization for longrange iteration if step is 1

2020-10-25 Thread Inada Naoki
Inada Naoki added the comment: Oh, I didn't know that. Thank you. I thought Chinese and Korean use surname-given name order because of "Xí Jìnpíng", "Moon Jae-in", and "Kim Jong-un". Japanese previous P.M. used "Shinzo Abe" English nota

[issue32122] Improve -x option documentation

2020-10-25 Thread Inada Naoki
Change by Inada Naoki : -- keywords: +newcomer friendly versions: +Python 3.10 -Python 2.7, Python 3.6, Python 3.7 ___ Python tracker <https://bugs.python.org/issue32

[issue33557] Windows multiprocessing doesn't propagate tabcheck to children

2020-10-25 Thread Inada Naoki
Inada Naoki added the comment: Python 2.7 became EOL. -- nosy: +methane resolution: -> out of date stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue39871] math.copysign raises SystemError with non-float x and custom y

2020-10-25 Thread Inada Naoki
Inada Naoki added the comment: New changeset f6255a2ccb55a63194caf698f471c803c08be359 by Zackery Spytz in branch '3.8': bpo-39871: Fix an error in a news entry (GH-21749) https://github.com/python/cpython/commit/f6255a2ccb55a63194caf698f471c8

[issue41662] Bugs in binding parameters in sqlite3

2020-10-25 Thread Inada Naoki
Inada Naoki added the comment: New changeset a053a7ecfef006b834a9957468fa461dafb332db by Miss Skeleton (bot) in branch '3.8': bpo-41662: Fix bugs in binding parameters in sqlite3 (GH-21998) https://github.com/python/cpython/commit/a053a7ecfef006b834a9957468fa461dafb332db -

[issue39189] Use io.DEFAULT_BUFFER_SIZE for filecmp BUFSIZE variable

2020-10-25 Thread Inada Naoki
Inada Naoki added the comment: I concur with Benjamin. Although two variables are similar, they are used in the different layer. -- nosy: +methane resolution: -> rejected stage: -> resolved status: open -> closed ___ Python tracke

[issue40255] Fixing Copy on Writes from reference counting

2020-10-25 Thread Inada Naoki
Inada Naoki added the comment: I'm big -1 too. But I am interested in Instagram usage. * How % of heap are CoW-ed with gc.freeze()? * When CoW happen? in execution time, or shutdown? * Which type cause CoW? I have two ideas to reduce CoW: * Fast shutdown option Currently Python t

[issue40255] Fixing Copy on Writes from reference counting

2020-10-25 Thread Inada Naoki
Change by Inada Naoki : -- versions: +Python 3.10 -Python 3.9 ___ Python tracker <https://bugs.python.org/issue40255> ___ ___ Python-bugs-list mailing list Unsub

[issue42176] Valgrind reports "Conditional jump or move depends on uninitialised value(s)" in `PyUnicode_AsEncodedString` and `PyUnicode_Decode`

2020-10-28 Thread Inada Naoki
Change by Inada Naoki : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue42176> ___ ___

[issue42160] unnecessary overhead in tempfile

2020-10-29 Thread Inada Naoki
Inada Naoki added the comment: New changeset 8e409cebad42032bb7d0f2cadd8b1e36081d98af by Eric W in branch 'master': bpo-42160: tempfile: Reduce overhead of pid check. (GH-22997) https://github.com/python/cpython/commit/8e409cebad42032bb7d0f2cadd8b1e36081d98af -- nosy

[issue40255] Fixing Copy on Writes from reference counting

2020-10-29 Thread Inada Naoki
Inada Naoki added the comment: >> Fast shutdown option > > You can use os._exit(0). Yes. Instagram use it as `atexit.register(os._exit, 0)`. https://instagram-engineering.com/dismissing-python-garbage-collection-at-instagram-4dca40b29172 I think this hack can be supported in mul

[issue42160] unnecessary overhead in tempfile

2020-10-29 Thread Inada Naoki
Inada Naoki added the comment: Thanks -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.10 -Python 3.6, Python 3.7, Python 3.8, Python 3.9 ___ Python tracker <https://bugs.python.or

[issue42202] Optimize function annotation

2020-10-29 Thread Inada Naoki
New submission from Inada Naoki : Look this example: code: ``` # code def foo(x: int, /, y, *, z: float) -> Hoge: pass # dis 2 12 LOAD_CONST 2 ('int') 14 LOAD_CONST 3 ('float') 16 LOAD_CONST

[issue42202] Optimize function annotation

2020-10-30 Thread Inada Naoki
Inada Naoki added the comment: > Are annotations now always known at compile time? Yes, because `from __future__ import annotations` is enabled by default from Python 3.10. > As for representation, it can also be a sequence of pairs (('x', 'int'), > ('z&#x

[issue42216] Optimize dict.popitem() & insert use case.

2020-10-30 Thread Inada Naoki
New submission from Inada Naoki : PyDict_DelItem stores DUMMY entry in the hash table. Without DUMMY, collision chain will be broken so proving will be not working. But `dict.popitem()` returns the last item in the insertion order. The item must be the last item of collision chain too. So

[issue42216] Optimize dict.popitem() & insert use case.

2020-10-30 Thread Inada Naoki
Change by Inada Naoki : -- keywords: +patch pull_requests: +21973 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23054 ___ Python tracker <https://bugs.python.org/issu

[issue42160] unnecessary overhead in tempfile

2020-10-30 Thread Inada Naoki
Inada Naoki added the comment: Oh, _RandomNameSequence is not true singleton. Instance is used in tests actually. Using `os.register_at_fork` was but idea. Let's reject it. -- ___ Python tracker <https://bugs.python.org/is

[issue42160] unnecessary overhead in tempfile

2020-10-30 Thread Inada Naoki
Change by Inada Naoki : -- pull_requests: +21974 stage: resolved -> patch review pull_request: https://github.com/python/cpython/pull/23055 ___ Python tracker <https://bugs.python.org/issu

[issue41835] Speed up dict vectorcall creation using keywords

2020-10-30 Thread Inada Naoki
Inada Naoki added the comment: unpack_sequence is very sensitive benchmark. Speed is dramatically changed by code alignment. PGO+LTO will reduce the noise, but we see noise always. I believe there is no significant performance change in macro benchmarks when optimizing this part. Not

[issue42160] unnecessary overhead in tempfile

2020-10-30 Thread Inada Naoki
Inada Naoki added the comment: New changeset 43ca084c88d1e46a44199f347c72e26db84903c9 by Inada Naoki in branch 'master': Revert "bpo-42160: tempfile: Reduce overhead of pid check. (GH-22997)" https://github.com/python/cpython/commit/43ca084c88d1e46a4419

<    4   5   6   7   8   9   10   11   12   13   >