Re: [Python-Dev] why is not 64-bit installer the default download link for Windows?

2018-07-10 Thread Nathaniel Smith
On Mon, Jul 9, 2018 at 10:20 AM, Steve Dower wrote: > On 09Jul2018 0922, Antoine Pitrou wrote: >> >> On Mon, 9 Jul 2018 09:01:00 -0700 >> Steve Dower wrote: >>> >>> I've thought a bit about making a single installer that can offer the >>> option of 32-bit/64-bit at install time, but I don't actua

Re: [Python-Dev] Encoding variable-length integers/counts in pickle

2018-07-10 Thread Andrew McLean
Google Protocol Buffers use something similar, which they call " Base 128 Varints" https://developers.google.com/protocol-buffers/docs/encoding#varints I prefer the way this handles negative numbers. - Andrew On 10 Ju

Re: [Python-Dev] Encoding variable-length integers/counts in pickle

2018-07-10 Thread Antoine Pitrou
On Tue, 10 Jul 2018 02:53:47 +0100 MRAB wrote: > In the regex module I use an encoding scheme when pickling pattern > objects which is based on the way MIDI encodes variable-length integers, > and I think it might have a use in a pickle protocol. > > In the basic format, an integer is split up

Re: [Python-Dev] Micro-benchmarks for PEP 580

2018-07-10 Thread Jeroen Demeyer
OK, I tried with --duplicate 200 and you can see the results at https://gist.github.com/jdemeyer/f0d63be8f30dc34cc989cd11d43df248 In short, the timings with and without PEP 580 are roughly the same (which is to be expected). Interestingly, a small but significant improvement can be seen when ca

Re: [Python-Dev] Micro-benchmarks for PEP 580

2018-07-10 Thread INADA Naoki
On Tue, Jul 10, 2018 at 8:55 PM Jeroen Demeyer wrote: > > OK, I tried with --duplicate 200 and you can see the results at > https://gist.github.com/jdemeyer/f0d63be8f30dc34cc989cd11d43df248 > > In short, the timings with and without PEP 580 are roughly the same > (which is to be expected). Interes

Re: [Python-Dev] Micro-benchmarks for PEP 580

2018-07-10 Thread Antoine Pitrou
On Tue, 10 Jul 2018 21:59:28 +0900 INADA Naoki wrote: > > Then, the function is called from another C extension like this: > > PyObject_CallFunction(func, "n", 42); > > Currently, we create temporary long object for passing argument. > If there is protocol for exposeing format used by PyArg_Par

Re: [Python-Dev] Micro-benchmarks for PEP 580

2018-07-10 Thread Jeroen Demeyer
On 2018-07-10 14:59, INADA Naoki wrote: Currently, we create temporary long object for passing argument. If there is protocol for exposeing format used by PyArg_Parse*, we can bypass temporal Python object and call myfunc_impl directly. Indeed, I already mentioned this at https://www.python.org

Re: [Python-Dev] PEP 572: Assignment Expressions -- intention to accept, near-final draft

2018-07-10 Thread Nick Coghlan
On 10 July 2018 at 11:00, Guido van Rossum wrote: > A lot has been said about PEP 572. I am planning to accept it soon, > hopefully within a week. I realize I should have posted the draft from May > 22 (when Tim and I were added as authors and it was significantly updated -- > see https://github.c

Re: [Python-Dev] why is not 64-bit installer the default download link for Windows?

2018-07-10 Thread Victor Stinner
2018-07-09 18:01 GMT+02:00 Steve Dower : > The difficulty is that they *definitely* can use the 32-bit version, and > those few who are on older machines or older installs of Windows may not > understand why the link we provide didn't work for them. Let's say that only 10% of users still use 32-bi

Re: [Python-Dev] Micro-benchmarks for PEP 580

2018-07-10 Thread Victor Stinner
2018-07-10 14:59 GMT+02:00 INADA Naoki : > PyObject_CallFunction(func, "n", 42); > > Currently, we create temporary long object for passing argument. > If there is protocol for exposeing format used by PyArg_Parse*, we can > bypass temporal Python object and call myfunc_impl directly. I'm not sure

Re: [Python-Dev] Micro-benchmarks for PEP 580

2018-07-10 Thread Victor Stinner
About your benchmark results: "FASTCALL unbound method(obj, 1, two=2): Mean +- std dev: 42.6 ns +- 29.6 ns" That's a very big standard deviation :-( Are you using CPU pinning and other technics explaining in my doc? http://perf.readthedocs.io/en/latest/run_benchmark.html#how-to-get-reproductible-

Re: [Python-Dev] Micro-benchmarks for function calls (PEP 576/579/580)

2018-07-10 Thread Victor Stinner
The pyperformance benchmark suite had micro benchmarks on function calls, but I removed them because they were sending the wrong signal. A function call by itself doesn't matter to compare two versions of CPython, or CPython to PyPy. It's also very hard to measure the cost of a function call when y

Re: [Python-Dev] On the METH_FASTCALL calling convention

2018-07-10 Thread Victor Stinner
2018-07-07 0:26 GMT+02:00 Victor Stinner : > I designed FASTCALL with the help of Serhiy for keywords. I prepared a long > email reply, but I found an opportunity for optimisation on **kwargs and I > need time to see how to optimize it. I just created: "Python function call optimization: avoid tem

Re: [Python-Dev] On the METH_FASTCALL calling convention

2018-07-10 Thread Victor Stinner
2018-07-07 10:55 GMT+02:00 Serhiy Storchaka : > There is my idea. Split every of keyword argument parsing functions on two > parts. The first part linearize keyword arguments, it converts positional > and keyword arguments (in whatever form they were presented) into a linear > array of PyObject* (w

Re: [Python-Dev] Micro-benchmarks for PEP 580

2018-07-10 Thread INADA Naoki
On Wed, Jul 11, 2018 at 7:47 AM Victor Stinner wrote: > > 2018-07-10 14:59 GMT+02:00 INADA Naoki : > > PyObject_CallFunction(func, "n", 42); > > > > Currently, we create temporary long object for passing argument. > > If there is protocol for exposeing format used by PyArg_Parse*, we can > > bypas

Re: [Python-Dev] Micro-benchmarks for PEP 580

2018-07-10 Thread INADA Naoki
On Tue, Jul 10, 2018 at 10:20 PM Antoine Pitrou wrote: > > On Tue, 10 Jul 2018 21:59:28 +0900 > INADA Naoki wrote: > > > > Then, the function is called from another C extension like this: > > > > PyObject_CallFunction(func, "n", 42); > > > > Currently, we create temporary long object for passing

Re: [Python-Dev] why is not 64-bit installer the default download link for Windows?

2018-07-10 Thread Ivan Pozdeev via Python-Dev
On 11.07.2018 1:41, Victor Stinner wrote: 2018-07-09 18:01 GMT+02:00 Steve Dower : The difficulty is that they *definitely* can use the 32-bit version, and those few who are on older machines or older installs of Windows may not understand why the link we provide didn't work for them. Let's say

Re: [Python-Dev] Micro-benchmarks for PEP 580

2018-07-10 Thread Stefan Behnel
INADA Naoki schrieb am 11.07.2018 um 02:12: > On Tue, Jul 10, 2018 at 10:20 PM Antoine Pitrou wrote: >> On Tue, 10 Jul 2018 21:59:28 +0900 >> INADA Naoki wrote: >>> >>> Then, the function is called from another C extension like this: >>> >>> PyObject_CallFunction(func, "n", 42); >>> >>> Currently,

Re: [Python-Dev] why is not 64-bit installer the default download link for Windows?

2018-07-10 Thread Steven D'Aprano
On Wed, Jul 11, 2018 at 05:14:34AM +0300, Ivan Pozdeev via Python-Dev wrote: > On 11.07.2018 1:41, Victor Stinner wrote: > >2018-07-09 18:01 GMT+02:00 Steve Dower : > >>The difficulty is that they *definitely* can use the 32-bit version, and > >>those few who are on older machines or older installs

Re: [Python-Dev] Micro-benchmarks for PEP 580

2018-07-10 Thread Stefan Behnel
INADA Naoki schrieb am 11.07.2018 um 02:01: > On Wed, Jul 11, 2018 at 7:47 AM Victor Stinner wrote: >> I proposed something simpler, but nobody tried to implement it. >> Instead of calling the long and complex PyArg_Parse...() functions, >> why not generating C code to parse arguments instead? The

Re: [Python-Dev] why is not 64-bit installer the default download link for Windows?

2018-07-10 Thread Stephen J. Turnbull
Ivan Pozdeev via Python-Dev writes: > "One or more issues caused the setup to fail. Please fix the issues and > the retry setup. For more information see the log file . > > 0x80070661 - This installation package is not supported by this > processor type. Contact your product vendor." >

Re: [Python-Dev] why is not 64-bit installer the default download link for Windows?

2018-07-10 Thread Glenn Linderman
On 7/10/2018 11:14 PM, Stephen J. Turnbull wrote: Ivan Pozdeev via Python-Dev writes: > "One or more issues caused the setup to fail. Please fix the issues and > the retry setup. For more information see the log file . > > 0x80070661 - This installation package is not supported by this