[issue34436] Overallocation is never disabled in _PyBytes_FormatEx()

2018-08-23 Thread Alexey Izbyshev


Alexey Izbyshev  added the comment:

Thank you for benchmarking and merging, Victor!

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34436] Overallocation is never disabled in _PyBytes_FormatEx()

2018-08-23 Thread miss-islington


miss-islington  added the comment:


New changeset 945771b3c7a08f0b2b875905d517a1566477bfaf by Miss Islington (bot) 
in branch '3.6':
bpo-34436: Fix check that disables overallocation for the last fmt specifier 
(GH-8826)
https://github.com/python/cpython/commit/945771b3c7a08f0b2b875905d517a1566477bfaf


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34436] Overallocation is never disabled in _PyBytes_FormatEx()

2018-08-23 Thread miss-islington


miss-islington  added the comment:


New changeset 042082692b7fab7361a8c9d0fb792532bb77e293 by Miss Islington (bot) 
in branch '3.7':
bpo-34436: Fix check that disables overallocation for the last fmt specifier 
(GH-8826)
https://github.com/python/cpython/commit/042082692b7fab7361a8c9d0fb792532bb77e293


--
nosy: +miss-islington

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34436] Overallocation is never disabled in _PyBytes_FormatEx()

2018-08-23 Thread miss-islington


Change by miss-islington :


--
pull_requests: +8340

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34436] Overallocation is never disabled in _PyBytes_FormatEx()

2018-08-23 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset ccd99752675042bd5f67d332c5b0ed85ba1f2da3 by Victor Stinner 
(Alexey Izbyshev) in branch 'master':
bpo-34436: Fix check that disables overallocation for the last fmt specifier 
(GH-8826)
https://github.com/python/cpython/commit/ccd99752675042bd5f67d332c5b0ed85ba1f2da3


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34436] Overallocation is never disabled in _PyBytes_FormatEx()

2018-08-23 Thread miss-islington


Change by miss-islington :


--
pull_requests: +8339

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34436] Overallocation is never disabled in _PyBytes_FormatEx()

2018-08-23 Thread STINNER Victor


STINNER Victor  added the comment:

I ran a microbenchmark on PR 8826:

./python -m perf timeit -s 'fmt=b"%s%s"; args=(b"1", b"x"*(1024*1024))' 'fmt % 
args' -v -o patch.json

$ python3 -m perf compare_to ref.json patch.json
Mean +- std dev: [ref] 325 us +- 7 us -> [patch] 36.2 us +- 1.1 us: 8.98x 
faster (-89%)

Ooops, yeah, it's obvious that there was a missed optimization. It's now way 
faster ;-)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34436] Overallocation is never disabled in _PyBytes_FormatEx()

2018-08-23 Thread STINNER Victor


STINNER Victor  added the comment:

bytes % args has been optimized using the _PyBytesWriter API in bpo-25349: 
commit fa7762ec066aa3632a25b6a52bb7597b8f17c2f3.

I converted my old benchmark from bpo-25349 to my new perf module:
https://github.com/vstinner/pymicrobench/blob/master/bench_bytes_format_int.py

See also my article on _PyBytesWriter API: 
https://vstinner.github.io/pybyteswriter.html

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34436] Overallocation is never disabled in _PyBytes_FormatEx()

2018-08-19 Thread Alexey Izbyshev


Change by Alexey Izbyshev :


--
keywords: +patch
pull_requests: +8305
stage:  -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34436] Overallocation is never disabled in _PyBytes_FormatEx()

2018-08-19 Thread Alexey Izbyshev


New submission from Alexey Izbyshev :

The condition for disabling overallocation at 225b055/Objects/bytesobject.c:822 
is always false.

Reported by Svace static analyzer.

--
components: Interpreter Core
messages: 323763
nosy: inada.naoki, izbyshev, serhiy.storchaka, vstinner
priority: normal
severity: normal
status: open
title: Overallocation is never disabled in _PyBytes_FormatEx()
type: performance
versions: Python 3.6, Python 3.7, Python 3.8

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com