[issue22791] datetime.utcfromtimestamp() shoud have option for create tz aware datetime

2014-11-04 Thread INADA Naoki
New submission from INADA Naoki: In [1]: import datetime In [2]: datetime.datetime.utcfromtimestamp(0) Out[2]: datetime.datetime(1970, 1, 1, 0, 0) In [3]: datetime.datetime.utcfromtimestamp(0).replace(tzinfo=datetime.timezone.utc) Out[3]: datetime.datetime(1970, 1, 1, 0, 0, tzinfo

[issue22791] datetime.utcfromtimestamp() shoud have option for create tz aware datetime

2014-11-04 Thread INADA Naoki
INADA Naoki added the comment: This is not a spelling issue. When people writing code converting between unixtime and datetime, they should find `.timestamp()` and `.utcfromtimestamp()`. But they may not awake about `.replace(tzinfo=datetime.timezone.utc)` is very important. Since

[issue22791] datetime.utcfromtimestamp() shoud have option for create tz aware datetime

2014-11-08 Thread INADA Naoki
INADA Naoki added the comment: akira: It seems cleaner than utcfromtimestamp().replace(). I think utcfromtimestamp() should have note about it. """ Note that it returns **naive** (tz=None) datetime. Naive datetime is treated as localtime in most functions. If you want to create

[issue23206] json.dumps(ensure_ascii=False) is ~10x slower than json.dumps()

2015-01-09 Thread INADA Naoki
New submission from INADA Naoki: I prefer ensure_ascii=False because it's efficient. But I notice it is very slower. On Python 3.4.2: In [3]: %timeit json.dumps([{'hello': 'world'}]*100) 1 loops, best of 3: 74.8 µs per loop In [4]: %timeit json.dumps([{'hello

[issue23206] json.dumps(ensure_ascii=False) is ~10x slower than json.dumps()

2015-01-09 Thread INADA Naoki
INADA Naoki added the comment: I've copied test_encode_basestring_ascii.py and modify it for this patch. -- Added file: http://bugs.python.org/file37654/test_encode_basestring.py ___ Python tracker <http://bugs.python.org/is

[issue23206] json.dumps(ensure_ascii=False) is ~10x slower than json.dumps()

2015-01-09 Thread INADA Naoki
INADA Naoki added the comment: Patch update. Now C version does escaping same way to Python version. -- Added file: http://bugs.python.org/file37656/json-fast-unicode-encode.patch ___ Python tracker <http://bugs.python.org/issue23

[issue23206] json.dumps(ensure_ascii=False) is ~10x slower than json.dumps()

2015-01-10 Thread INADA Naoki
INADA Naoki added the comment: I've updated patch to use PyUnicode_MAX_CHAR_VALUE(). -- Added file: http://bugs.python.org/file37669/json-fast-unicode-encode.patch ___ Python tracker <http://bugs.python.org/is

[issue23206] json.dumps(ensure_ascii=False) is ~10x slower than json.dumps()

2015-01-10 Thread INADA Naoki
INADA Naoki added the comment: test_encode_basestring_ascii.py has duplicated test cases. -- Added file: http://bugs.python.org/file37670/json-fast-unicode-encode.patch ___ Python tracker <http://bugs.python.org/issue23

[issue24870] surrogateescape is too slow

2015-08-14 Thread INADA Naoki
New submission from INADA Naoki: surrogateescape is recommended way to mix binary data in string protocol. But surrogateescape is too slow and it cause usability problem. One actual problem is: https://github.com/PyMySQL/PyMySQL/issues/366 surrogateescape is slow because errorhandler is called

[issue24870] surrogateescape is too slow

2015-08-14 Thread INADA Naoki
INADA Naoki added the comment: On MacBook Pro (Core i5 2.6GHz), surrogateescape 1MB data takes 250ms. In [1]: bs = bytes(range(256)) * (4 * 1024) In [2]: len(bs) Out[2]: 1048576 In [3]: %timeit x = bs.decode('ascii', 'surrogateescape') 1 loops, best o

[issue24870] Optimize coding with surrogateescape and surrogatepass error handlers

2015-08-16 Thread INADA Naoki
INADA Naoki added the comment: I've stripped Serhiy's patch for ascii. Here is benchmark result: https://gist.github.com/methane/2376ac5d20642c05a8b6#file-result-md Is there chance for applying this patch to 3.5.1? -- Added file: http://bugs.python.org/file40195/faster-de

[issue24870] Optimize coding with surrogateescape and surrogatepass error handlers

2015-08-19 Thread INADA Naoki
INADA Naoki added the comment: > Why are bytes being escaped in a binary blob? The reason to use > surrogateescape is when you have data that is mostly text, should be > processed as text, but can have occasional binary data. That wouldn't seem > to apply to a database bi

[issue24870] Optimize ascii and latin1 decoder with surrogateescape and surrogatepass error handlers

2015-10-10 Thread INADA Naoki
INADA Naoki added the comment: UTF-8 and Latin1 are typical encoding for MySQL query. When inserting BLOB: # Decode binary data x = data.decode('ascii', 'surrogateescape') # %-format query psql = sql % (escape(x),) # sql is unicode # Encode sql to connection enco

[issue24870] Optimize ascii and latin1 decoder with surrogateescape and surrogatepass error handlers

2016-01-07 Thread INADA Naoki
INADA Naoki added the comment: FYI, I found a workaround. https://github.com/PyMySQL/PyMySQL/pull/409 _table = [chr(i) for i in range(128)] + [chr(i) for i in range(0xdc80, 0xdd00)] def decode_surroundescape(s): return s.decode('latin1').translate(_table) In [15]: data = b&#x

[issue26172] iBook can't open ePub

2016-01-20 Thread INADA Naoki
New submission from INADA Naoki: Script cannot run in iBook is included in ePub. Attached patch resolves the issue. -- assignee: docs@python components: Documentation files: epub.patch keywords: patch messages: 258734 nosy: docs@python, naoki priority: normal severity: normal status

[issue25907] Documentation i18n: Added trans tags in sphinx templates

2016-01-23 Thread INADA Naoki
INADA Naoki added the comment: O/T Hi, Julien. I'm maintainer of Python Document Japanese translation project. (http://docs.python.jp/ ) We use Transifex to ease many volunteers working on translating. https://www.transifex.com/python-doc-ja/python-35/dashboard/ Repository of Pytho

[issue10401] Globals / builtins cache

2016-01-27 Thread INADA Naoki
Changes by INADA Naoki : -- nosy: +naoki ___ Python tracker <http://bugs.python.org/issue10401> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue25702] Link Time Optimizations support for GCC and CLANG

2016-03-03 Thread INADA Naoki
INADA Naoki added the comment: Can we use LTO without PGO? PGO increases build time few times. -- nosy: +naoki ___ Python tracker <http://bugs.python.org/issue25

[issue25702] Link Time Optimizations support for GCC and CLANG

2016-03-03 Thread INADA Naoki
INADA Naoki added the comment: Sorry my poor English. I meant that "Does `./configure --with-lto && make` use LTO?". -- ___ Python tracker <http://bugs.

[issue25702] Link Time Optimizations support for GCC and CLANG

2016-03-03 Thread INADA Naoki
INADA Naoki added the comment: I've tried LTO without PGO in Debian Jessie. $ LTOFLAGS='-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none' $ CFLAGS=$LTOFLAGS LDFLAGS=$LTOFLAGS ./configure --prefix=... $ make -j32 results is here (compared with neither LTO

[issue25702] Link Time Optimizations support for GCC and CLANG

2016-03-04 Thread INADA Naoki
INADA Naoki added the comment: The machine is Google Compute Engine n1-highcpu-32 (Intel Ivy Bridge) Linux bench 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt20-1+deb8u3 (2016-01-17) x86_64 GNU/Linux cpuinfo: processor : 31 vendor_id : GenuineIntel cpu family : 6 model

[issue25702] Link Time Optimizations support for GCC and CLANG

2016-03-04 Thread INADA Naoki
INADA Naoki added the comment: > For sure you are not the only user that has active workloads on the physical > machine while you do benchmarks :) I think largest machine type I chosen (32core) can avoid sharing physical machine with other users. > On the other hand, the path you

[issue26763] Update PEP-8 regarding binary operators

2016-04-15 Thread INADA Naoki
INADA Naoki added the comment: https://github.com/python/peps/compare/master...IanLee1521:issue26763 -- nosy: +naoki ___ Python tracker <http://bugs.python.org/issue26

[issue26763] Update PEP-8 regarding binary operators

2016-04-15 Thread INADA Naoki
INADA Naoki added the comment: Roundup doesn't link to Github's branch comparing URL correctly. How about just create pull request on Github? -- ___ Python tracker <http://bugs.python.o

[issue26763] Update PEP-8 regarding binary operators

2016-04-15 Thread INADA Naoki
INADA Naoki added the comment: How about recommend using parentheses to avoid different level operators have same indent level? ok: if (width == 0 and height == 0 and color == 'red' and emphasis == 'strong'

[issue26763] Update PEP-8 regarding binary operators

2016-04-15 Thread INADA Naoki
INADA Naoki added the comment: On Fri, Apr 15, 2016 at 11:31 PM, Guido van Rossum wrote: > > Guido van Rossum added the comment: > > I don't like the way "):" is indented in that example. Me too. I haven't know about this PEP8 update. https

[issue26813] Wrong Japanese translation of "Adverb" on Documentation

2016-04-20 Thread INADA Naoki
INADA Naoki added the comment: Thank you for reporting. Japanese translation team has own issue tracker in Github. I copied this issue to https://github.com/python-doc-ja/python-doc-ja/issues/733 -- nosy: +naoki ___ Python tracker <h

[issue27956] optimize dict_traverse a bit

2016-09-05 Thread INADA Naoki
INADA Naoki added the comment: lgtm. But http://bugs.python.org/issue27350 conflicts this. -- nosy: +methane ___ Python tracker <http://bugs.python.org/issue27

[issue27350] Compact and ordered dict

2016-09-06 Thread INADA Naoki
Changes by INADA Naoki : Added file: http://bugs.python.org/file44395/compact-dict.patch ___ Python tracker <http://bugs.python.org/issue27350> ___ ___ Python-bugs-list m

[issue27350] Compact and ordered dict

2016-09-06 Thread INADA Naoki
INADA Naoki added the comment: Update the patch to use standard int types instead of adding PY_INT16_T ref: https://bugs.python.org/issue17884 -- Added file: http://bugs.python.org/file44418/compact-dict.patch ___ Python tracker <h

[issue28040] compact dict : SystemError: returned NULL without setting an error.

2016-09-09 Thread INADA Naoki
INADA Naoki added the comment: I've forgot to convert split table into combined table when del and .pop(). I'm sorry, and thanks to finding it. -- Added file: http://bugs.python.org/file44497/fix-compact-dict-deletion.patch ___ Python trac

[issue28040] compact dict : SystemError: returned NULL without setting an error.

2016-09-09 Thread INADA Naoki
Changes by INADA Naoki : Added file: http://bugs.python.org/file44498/fix-compact-dict-deletion.patch ___ Python tracker <http://bugs.python.org/issue28040> ___ ___ Pytho

[issue28040] compact dict : SystemError: returned NULL without setting an error.

2016-09-09 Thread INADA Naoki
INADA Naoki added the comment: > Xiang Zhang added the comment: > > Are you sure INADA? The previous dict implementation has the same constraint > but does merge in dict_pop. > Yes. New dict implementation preserves insertion order. class A: ... a, b = A(), A() a.a, a.b

[issue28040] compact dict : SystemError: returned NULL without setting an error.

2016-09-09 Thread INADA Naoki
Changes by INADA Naoki : Added file: http://bugs.python.org/file44519/fix-splittable-pop.patch ___ Python tracker <http://bugs.python.org/issue28040> ___ ___ Python-bug

[issue28040] compact dict : SystemError: returned NULL without setting an error.

2016-09-09 Thread INADA Naoki
INADA Naoki added the comment: Added test which reproduce the issue on current master. -- ___ Python tracker <http://bugs.python.org/issue28040> ___ ___ Python-bug

[issue28042] Coverity Scan defects in new dict code

2016-09-09 Thread INADA Naoki
INADA Naoki added the comment: > Inada, I sent you an invite. Does the invite sent me by email? I'm sorry, but I may lost the mail. -- ___ Python tracker <http://bugs.python.org

[issue27350] Compact and ordered dict

2016-09-10 Thread INADA Naoki
INADA Naoki added the comment: 3% slowdown in microbench is not surprising. Compact dict introduces one additional indirection. Instead, I've added freelist for most compact PyDictKeys. So I think overall performance is almost same to before compact

[issue28061] Python crashes on 'from test import support'

2016-09-10 Thread INADA Naoki
INADA Naoki added the comment: Which hg (or git) revision do you use? -- ___ Python tracker <http://bugs.python.org/issue28061> ___ ___ Python-bugs-list mailin

[issue28061] Python crashes on 'from test import support'

2016-09-10 Thread INADA Naoki
INADA Naoki added the comment: According to IRC log, the issue happens on Windows. And hg revision is a477ef882a16. I'll try building Python on Windows 10 amd64 in this weekend. -- ___ Python tracker <http://bugs.python.org/is

[issue26081] Implement asyncio Future in C to improve performance

2016-09-10 Thread INADA Naoki
Changes by INADA Naoki : Added file: http://bugs.python.org/file44531/fastfuture.patch ___ Python tracker <http://bugs.python.org/issue26081> ___ ___ Python-bugs-list m

[issue26081] Implement asyncio Future in C to improve performance

2016-09-10 Thread INADA Naoki
INADA Naoki added the comment: Oh, I'm sorry. I usually working on git, and convert git diff to hg diff when posting patch. I've used `patch -p1` instead of `hg import --no-edit` to apply git patch into hg workdir. I wonder if Rietveld accepts git diff format... -- Added

[issue26081] Implement asyncio Future in C to improve performance

2016-09-11 Thread INADA Naoki
INADA Naoki added the comment: Sorry, again. fixed. Now this passes `./python -m test.test_asyncio` -- Added file: http://bugs.python.org/file44547/fastfuture.patch ___ Python tracker <http://bugs.python.org/issue26

[issue28061] Compact dict bug on Windows (Visual Studio): if (mp->ma_keys->dk_usable * 3 < other->ma_used * 2)

2016-09-11 Thread INADA Naoki
INADA Naoki added the comment: I built acfe53a (git hash). Then: c:\Users\inada-n\work\cpython>PCbuild\win32\python_d.exe -m test.test_dict .. --

[issue28061] Compact dict bug on Windows (Visual Studio): if (mp->ma_keys->dk_usable * 3 < other->ma_used * 2)

2016-09-11 Thread INADA Naoki
INADA Naoki added the comment: I noticed I tested win32 mode. I'll rebuild on amd64 mode. > Oh, same questions for you Naoki in fact :-) I don't know about how to describe exist version of my Windows environment. Is these enough? Windows 10 Home (with Anniversary Update) 10.

[issue28061] Compact dict bug on Windows (Visual Studio): if (mp->ma_keys->dk_usable * 3 < other->ma_used * 2)

2016-09-11 Thread INADA Naoki
INADA Naoki added the comment: amd64 result c:\Users\inada-n\work\cpython>PCbuild\amd64\python_d.exe -m test.test_dict .. -- Ran 78 tests in 1.498s

[issue28077] Fix find_empty_slot in dictobject

2016-09-12 Thread INADA Naoki
INADA Naoki added the comment: It cannot hit from Python. The function never called for split table, since resize function combine split table. So we can just comment the function supports only combined table. -- ___ Python tracker <h

[issue28040] compact dict : SystemError: returned NULL without setting an error.

2016-09-12 Thread INADA Naoki
INADA Naoki added the comment: Xiang: Preserving insertion order in shared-key dict is possible, but it's hard. If we allow it, we should add tons of test for shared-key dict. I'll describe why it's harder than you think. Current implementation allow insertion to split

[issue28040] compact dict : SystemError: returned NULL without setting an error.

2016-09-12 Thread INADA Naoki
INADA Naoki added the comment: > So what if we delete mp->ma_used == ix or use mp->ma_keys->dk_nentries == ix? > Do we still have any case breaking the order? Yes. `mp->ma_used == ix` means no more guard about key ordering. class C: ... a, b = C() a.a, a.b = 1, 2 # s

[issue28120] Bug in _PyDict_Pop() on a splitted table

2016-09-13 Thread INADA Naoki
INADA Naoki added the comment: Oh, very thank you, Xiang. -- ___ Python tracker <http://bugs.python.org/issue28120> ___ ___ Python-bugs-list mailing list Unsub

[issue28147] Memory leak in new 3.6 dictionary resize

2016-09-14 Thread INADA Naoki
INADA Naoki added the comment: I don't understand the leak yet. > Each time dict_resize is called, it gets a new, larger size `> minused`. If > this is triggered many times, it will keep growing in size by a factor of two > each time, as the previous size is passed as min

[issue28147] Memory leak in new 3.6 dictionary resize

2016-09-14 Thread INADA Naoki
INADA Naoki added the comment: Ah, is the leak happen in 3.6b1? dict.pop() in 3.6b1 doesn't combine split table. It was a bug and fixed in master branch already. Regardless the leak, I agree that grow dict when popping is bad idea. I'll improve

[issue28144] Decrease empty_keys_struct's dk_refcnt

2016-09-14 Thread INADA Naoki
INADA Naoki added the comment: Nice catch! -- ___ Python tracker <http://bugs.python.org/issue28144> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue28147] Unbounded memory growth resizing split-table dicts

2016-09-14 Thread INADA Naoki
INADA Naoki added the comment: I confirmed and investigated it. Thanks! I'll post patch including more test in 24 hours. -- ___ Python tracker <http://bugs.python.org/is

[issue28147] Unbounded memory growth resizing split-table dicts

2016-09-14 Thread INADA Naoki
Changes by INADA Naoki : Added file: http://bugs.python.org/file44665/fix-28147.patch ___ Python tracker <http://bugs.python.org/issue28147> ___ ___ Python-bugs-list m

[issue28147] Unbounded memory growth resizing split-table dicts

2016-09-14 Thread INADA Naoki
INADA Naoki added the comment: This issue is caused by dictresize() and _PyObjectDict_SetItem() 1. a.__dict__.pop('a') convert the dict to combined table which has double keysize. 2. a.a = 1 converts the dict to split table again if there are no instances sharing key with class.

[issue28147] Unbounded memory growth resizing split-table dicts

2016-09-14 Thread INADA Naoki
Changes by INADA Naoki : Added file: http://bugs.python.org/file44666/fix-28147.patch ___ Python tracker <http://bugs.python.org/issue28147> ___ ___ Python-bugs-list m

[issue28147] Unbounded memory growth resizing split-table dicts

2016-09-14 Thread INADA Naoki
INADA Naoki added the comment: xiang is right. Python 3.5 has same issue when using popitem(). I'll make patch for 3.5. But it will be bit differ from patch for 3.6 and they will conflict. -- ___ Python tracker <http://bugs.python.org/is

[issue26081] Implement asyncio Future in C to improve performance

2016-09-14 Thread INADA Naoki
INADA Naoki added the comment: I'm working on fixing points you commented. Wait a minute. Implementing __del__ and __repr__ in C is bit hard task to me. I can't do it in this week. (maybe I can't do it in this month too.) On Thu, Sep 15, 2016 at 7:37 AM, Yury Selivanov

[issue26081] Implement asyncio Future in C to improve performance

2016-09-14 Thread INADA Naoki
INADA Naoki added the comment: This is the patch. And git branch is here https://github.com/methane/cpython/pull/5 -- Added file: http://bugs.python.org/file44670/fastfuture.patch ___ Python tracker <http://bugs.python.org/issue26

[issue28147] Unbounded memory growth resizing split-table dicts

2016-09-16 Thread INADA Naoki
INADA Naoki added the comment: This is patch for Python 3.5. The patch uses more conservative approach. -- Added file: http://bugs.python.org/file44696/fix-28147-py35.patch ___ Python tracker <http://bugs.python.org/issue28

[issue28183] Clean up and speed up dict iteration

2016-09-18 Thread INADA Naoki
INADA Naoki added the comment: LGTM, thanks. -- ___ Python tracker <http://bugs.python.org/issue28183> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue28147] Unbounded memory growth resizing split-table dicts

2016-09-18 Thread INADA Naoki
INADA Naoki added the comment: xiang: dictresize(d, n) may choose keysize==n (when n == 2**m) with this patch. If there are any integer a such as ESTIMATE_SIZE(a) == n and n == 2**m and USABLE_FRACTION(n) == a - 1, a items cannot be inserted into dict after dictresize(d, ESTIMATE_SIZE(a

[issue28199] Compact dict resizing is doing too much work

2016-09-18 Thread INADA Naoki
INADA Naoki added the comment: Current compact ordered dict implementation is bit different from yours. When there was removed item, there are NULL entries in ma_entries, instead of swapping last item and deleted item. It's important to keep insertion order. But it's easy to detect

[issue28201] dict: perturb shift should be done when first conflict

2016-09-18 Thread INADA Naoki
New submission from INADA Naoki: Current perturb shift code is like following: for (perturb = hash; ; perturb >>= PERTURB_SHIFT) { i = mask & ((i << 2) + i + perturb + 1); This loop is start after first conflict. It means perturb == hash for first conflict. The pu

[issue28199] Compact dict resizing is doing too much work

2016-09-18 Thread INADA Naoki
INADA Naoki added the comment: > We can still clean this up for Python 3.6. We're in feature freeze, not > development freeze. Does it mean there is a chance to improve OrderedDict to use new dict implementation, if it seems safe enough? Is new implementation a feature? (After

[issue28201] dict: perturb shift should be done when first conflict

2016-09-20 Thread INADA Naoki
Changes by INADA Naoki : -- keywords: +patch Added file: http://bugs.python.org/file44759/dict-perturb-shift.patch ___ Python tracker <http://bugs.python.org/issue28

[issue28201] dict: perturb shift should be done when first conflict

2016-09-21 Thread INADA Naoki
INADA Naoki added the comment: josh.r: > I believe per PEP7, we're still sticking to ANSI C (aka C89), and > specifically, "all declarations must be at the top of a block (not > necessarily at the top of function". Python 3.6 branch allows some C99 features. https:/

[issue28201] dict: perturb shift should be done when first conflict

2016-09-21 Thread INADA Naoki
Changes by INADA Naoki : Added file: http://bugs.python.org/file44774/dict-perturb-shift.patch ___ Python tracker <http://bugs.python.org/issue28201> ___ ___ Python-bug

[issue28042] Coverity Scan defects in new dict code

2016-09-21 Thread INADA Naoki
INADA Naoki added the comment: Thanks. It seems coverity doesn't understand assert(j >= 0); Can I tell it to coverity from source code? -- ___ Python tracker <http://bugs.python.org

[issue28042] Coverity Scan defects in new dict code

2016-09-21 Thread INADA Naoki
INADA Naoki added the comment: OK, I ignored it on Coverity site. -- ___ Python tracker <http://bugs.python.org/issue28042> ___ ___ Python-bugs-list mailin

[issue28239] Implement functools.lru_cache() using ordered dict

2016-09-22 Thread INADA Naoki
INADA Naoki added the comment: FYI: Here is interesting article. doubly-linked list is more inefficient than most people think. http://alex.dzyoba.com/programming/dynamic-arrays.html -- ___ Python tracker <http://bugs.python.org/issue28

[issue28180] sys.getfilesystemencoding() should default to utf-8

2016-09-23 Thread INADA Naoki
INADA Naoki added the comment: I want locale free Python which behaves like on C.UTF-8 locale. (stdio encoding, preferred encoding, weekday in _strptime._strptime, and more maybe) But Python 3.6 is feature freeze already >_<;; -- nosy: +inada

[issue18893] invalid exception handling in Lib/ctypes/macholib/dyld.py

2016-09-24 Thread INADA Naoki
INADA Naoki added the comment: lgtm -- nosy: +inada.naoki ___ Python tracker <http://bugs.python.org/issue18893> ___ ___ Python-bugs-list mailing list Unsub

[issue18893] invalid exception handling in Lib/ctypes/macholib/dyld.py

2016-09-24 Thread INADA Naoki
Changes by INADA Naoki : -- versions: +Python 2.7, Python 3.5, Python 3.6 -Python 3.2, Python 3.3, Python 3.4 ___ Python tracker <http://bugs.python.org/issue18

[issue28147] Unbounded memory growth resizing split-table dicts

2016-09-26 Thread INADA Naoki
Changes by INADA Naoki : -- versions: +Python 3.5 ___ Python tracker <http://bugs.python.org/issue28147> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue28183] Clean up and speed up dict iteration

2016-09-27 Thread INADA Naoki
INADA Naoki added the comment: Serhiy, may I update your patch, if you're busy in this week? -- ___ Python tracker <http://bugs.python.org/issue28183> ___ ___

[issue28183] Clean up and speed up dict iteration

2016-09-28 Thread INADA Naoki
INADA Naoki added the comment: Updated with small refactoring. Confirmed passes quicktest and no warning from clang on OS X. -- Added file: http://bugs.python.org/file44857/dict_iter3.patch ___ Python tracker <http://bugs.python.org/issue28

[issue28183] Clean up and speed up dict iteration

2016-09-28 Thread INADA Naoki
Changes by INADA Naoki : -- versions: +Python 3.7 Added file: http://bugs.python.org/file44864/dict_iter4.patch ___ Python tracker <http://bugs.python.org/issue28

[issue28183] Clean up and speed up dict iteration

2016-09-28 Thread INADA Naoki
INADA Naoki added the comment: Draft Misc/NEWS entry (and commit message) is: Core and Builtins - +- Issue #28183: Optimize dict iteration. + -- ___ Python tracker <http://bugs.python.org/issue28

[issue28147] Unbounded memory growth resizing split-table dicts

2016-09-28 Thread INADA Naoki
INADA Naoki added the comment: haypo, Could you review fix-28147-py35.patch and fix-28147.patch ? Draft NEWS entry: - Issue #28147: Fixed split table dict may consume unlimited memory. -- ___ Python tracker <http://bugs.python.org/issue28

[issue27275] KeyError thrown by optimised collections.OrderedDict.popitem()

2016-09-28 Thread INADA Naoki
INADA Naoki added the comment: lgtm -- nosy: +inada.naoki ___ Python tracker <http://bugs.python.org/issue27275> ___ ___ Python-bugs-list mailing list Unsub

[issue28183] Clean up and speed up dict iteration

2016-09-28 Thread INADA Naoki
Changes by INADA Naoki : Added file: http://bugs.python.org/file44874/dict_iter5.patch ___ Python tracker <http://bugs.python.org/issue28183> ___ ___ Python-bugs-list m

[issue24274] erroneous comments in dictobject.c

2016-09-29 Thread INADA Naoki
Changes by INADA Naoki : -- keywords: +patch Added file: http://bugs.python.org/file44875/lookdict_unicode_comment.patch ___ Python tracker <http://bugs.python.org/issue24

[issue28183] Clean up and speed up dict iteration

2016-09-29 Thread INADA Naoki
INADA Naoki added the comment: recreate patch with different option, since Rietveld doesn't accept dict_iter5.patch -- Added file: http://bugs.python.org/file44876/dict_iter6.patch ___ Python tracker <http://bugs.python.org/is

[issue28183] Clean up and speed up dict iteration

2016-09-29 Thread INADA Naoki
Changes by INADA Naoki : Added file: http://bugs.python.org/file44879/dict_iter7.patch ___ Python tracker <http://bugs.python.org/issue28183> ___ ___ Python-bugs-list m

[issue28201] dict: perturb shift should be done when first conflict

2016-09-29 Thread INADA Naoki
INADA Naoki added the comment: Could anyone review the patch? I'm starting to #28199. But it must conflict with this patch. -- assignee: -> inada.naoki ___ Python tracker <http://bugs.python.org

[issue28199] Compact dict resizing is doing too much work

2016-09-29 Thread INADA Naoki
INADA Naoki added the comment: As written in comment, reusing keys object breaks odict implementation. I think we can't avoid copy for Python 3.6. -- keywords: +patch Added file: http://bugs.python.org/file44888/dictresize.patch ___ Python tr

[issue28199] Compact dict resizing is doing too much work

2016-09-30 Thread INADA Naoki
INADA Naoki added the comment: $ ./install/bin/python3.6-default -m perf timeit -s 'x = range(1000); d={}' 'for i in x: d[i]=i; del d[i];' Median +- std dev: 363 us +- 11 us $ ./install/bin/python3.6 -m perf timeit -s 'x = range(1000); d={}'

[issue28183] Clean up and speed up dict iteration

2016-09-30 Thread INADA Naoki
INADA Naoki added the comment: Refactoring includes replacing PyDict_Next with _PyDict_Next. It can improve performance by skipping some checks. But it would be too small to see difference from benchmark. I'll reduce diff size, hopefully in this we

[issue28199] Compact dict resizing is doing too much work

2016-09-30 Thread INADA Naoki
INADA Naoki added the comment: Ah, I'm sorry. I forget to remove some changes relating to inplace compaction (reusing oldkeys when oldsize==newsize). -- Added file: http://bugs.python.org/file44893/dictresize2.patch ___ Python tracker

[issue28201] dict: perturb shift should be done when first conflict

2016-10-01 Thread INADA Naoki
Changes by INADA Naoki : -- stage: -> patch review type: -> performance ___ Python tracker <http://bugs.python.org/issue28201> ___ ___ Python-bugs-list

[issue24274] erroneous comments in dictobject.c

2016-10-01 Thread INADA Naoki
Changes by INADA Naoki : -- assignee: -> inada.naoki stage: needs patch -> patch review ___ Python tracker <http://bugs.python.org/issue24274> ___ ___ Pyth

[issue28331] "CPython implementation detail:" is removed when contents is translated

2016-10-01 Thread INADA Naoki
New submission from INADA Naoki: "CPython implementation detail:" label is removed when contents of impl-detail directive is translated. This is very bad for people reading translated documents. Attached patch fixes this, with enabling translating the label, like versionchanged

[issue28183] Clean up and speed up dict iteration

2016-10-01 Thread INADA Naoki
INADA Naoki added the comment: dict_iter8.patch is based on dict_iter3.patch. Added some comments and fixing indents. No change about _PyDict_Next API. -- Added file: http://bugs.python.org/file44921/dict_iter8.patch ___ Python tracker <h

[issue28328] statistics.geometric_mean has no tests. Defer to 3.7?

2016-10-03 Thread INADA Naoki
INADA Naoki added the comment: I run attached test, and saw following errors. On macOS 10.11 (XCode 8) $ hg summary parent: 104258:0d948a46c59a test_invalid_sequences seems don't have to stay in CAPITest. branch: 3.6 commit: 1 modified, 1 unknown update: (current) $ ./python.e

[issue28328] statistics.geometric_mean has no tests. Defer to 3.7?

2016-10-03 Thread INADA Naoki
INADA Naoki added the comment: Attached patch fixes first two errors. Last one error is from test. I've commented it in review tool. -- Added file: http://bugs.python.org/file44941/geometric_mean.patch ___ Python tracker <http://bugs.py

[issue28088] Document Transport.set_protocol and get_protocol

2016-10-03 Thread INADA Naoki
INADA Naoki added the comment: lgtm. But I think adding note like following may be helpful to avoid users try switching protocols which protocol author doesn't expect. (I'm not good English writer. I hope someone polish my sentence). .. note:: Generally speaking, switching

[issue28023] python-gdb.py must be updated for the new Python 3.6 compact dict

2016-10-04 Thread INADA Naoki
INADA Naoki added the comment: I've fixed dict support of python-gdb.py. But I found py-bt and py-bt-full are broken. They doesn't show builtin method. I think it's because FASTCALL. But I'm not sure. I just skip the test for py-bt in attached patch. -- assig

[issue28201] dict: perturb shift should be done when first conflict

2016-10-04 Thread INADA Naoki
INADA Naoki added the comment: Fixed conflict with current 3.6 branch, and added NEWS entry. -- Added file: http://bugs.python.org/file44966/dict-perturb-shift2.patch ___ Python tracker <http://bugs.python.org/issue28

[issue28362] Deprecation warning doesn't stand out enough

2016-10-04 Thread INADA Naoki
INADA Naoki added the comment: default.css was changed? https://docs.python.org/3.3/_static/default.css https://docs.python.org/3.4/_static/default.css -- nosy: +inada.naoki ___ Python tracker <http://bugs.python.org/issue28

<    24   25   26   27   28   29   30   31   >