[issue26039] More flexibility in zipfile interface

2016-02-04 Thread Thomas Kluyver
Thomas Kluyver added the comment: Is there anything more I should be doing with either of these patches? I think I've incorporated all review comments I've seen. Thanks! -- ___ Python tracker

[issue26275] perf.py: calibrate benchmarks using time, not using a fixed number of iterations

2016-02-04 Thread Florin Papa
Florin Papa added the comment: I ran perf to use calibration and there is no difference in stability compared to the unpatched version. With patch: python perf.py -b json_dump_v2 -v --csv=out1.csv --affinity=2 ../cpython/python ../cpython/python INFO:root:Automatically selected timer:

[issue22107] tempfile module misinterprets access denied error on Windows

2016-02-04 Thread Thomas Kluyver
Thomas Kluyver added the comment: This issue was closed, but I believe the original bug reported was not fixed: trying to create a temporary file in a directory where you don't have write permissions hangs for a long time before failing with a misleading FileExistsError, rather than failing

[issue21955] ceval.c: implement fast path for integers with a single digit

2016-02-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: fastint2.patch adds small regression for string multiplication: $ ./python -m timeit -s "x = 'x'" -- "x*2; x*2; x*2; x*2; x*2; x*2; x*2; x*2; x*2; x*2; " Unpatched: 1.46 usec per loop Patched:1.54 usec per loop Here is an alternative patch. It just

[issue26252] Add an example to importlib docs on setting up an importer

2016-02-04 Thread Maciej Szulik
Changes by Maciej Szulik : -- nosy: +maciej.szulik ___ Python tracker ___ ___

[issue26275] perf.py: calibrate benchmarks using time, not using a fixed number of iterations

2016-02-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: Victor, this is a very interesting write-up, thank you. -- ___ Python tracker ___

[issue26275] perf.py: calibrate benchmarks using time, not using a fixed number of iterations

2016-02-04 Thread Stefan Krah
Stefan Krah added the comment: > STINNER Victor added the comment: > I modified Stefan's telco.py to remove all I/O from the hot code: the > benchmark is now really CPU-bound. I also modified telco.py to run the > benchmark 5 times. One run takes around 2.6 seconds. > Nice. telco.py is an

[issue26269] zipfile should call lstat instead of stat if available

2016-02-04 Thread Anish Shah
Changes by Anish Shah : -- nosy: +anish.shah ___ Python tracker ___ ___

[issue26275] perf.py: calibrate benchmarks using time, not using a fixed number of iterations

2016-02-04 Thread STINNER Victor
STINNER Victor added the comment: Stefan: "In my experience it is very hard to get stable benchmark results with Python. Even long running benchmarks on an empty machine vary: (...)" tl; dr We *can* tune the Linux kernel to avoid most of the system noise when running kernels. I modified

[issue26110] Speedup method calls 1.2x

2016-02-04 Thread Maciej Szulik
Changes by Maciej Szulik : -- nosy: +maciej.szulik ___ Python tracker ___ ___

[issue21955] ceval.c: implement fast path for integers with a single digit

2016-02-04 Thread STINNER Victor
STINNER Victor added the comment: I prefer fastint_alt.patch design, it's simpler. I added a comment on the review. My numbers, best of 5 timeit runs: $ ./python -m timeit -s "x = 12345" -- "x*2; x*2; x*2; x*2; x*2; x*2; x*2; x*2; x*2; x*2; " * original: 299 ns * fastint2.patch: 282 ns (-17

[issue26286] dis module: coroutine opcode documentation clarity

2016-02-04 Thread Jim Jewett
New submission from Jim Jewett: https://docs.python.org/3/library/dis.html includes a section describing the various opcodes. Current documentation: """ Coroutine opcodes GET_AWAITABLE Implements TOS = get_awaitable(TOS), where get_awaitable(o) returns o if o is a coroutine object or a

[issue23551] IDLE to provide menu link to PIP gui.

2016-02-04 Thread Upendra Kumar
Upendra Kumar added the comment: I am trying to make a Tk based GUI for pip package manager. In reference to msg256736, I am confused about the discovery method mentioned. Is there any way already implemented to detect the Python versions installed systemwide? Moreover, how to manage the

[issue26285] Garbage collection of unused input sections from CPython binaries

2016-02-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: Le 04/02/2016 21:42, Alecsandru Patrascu a écrit : > > To compress all of the above, the main reason for this speedup is the > reduction of the code path length and having the useful function > close together, so that the CPU will be able to prefetch them in >

[issue21955] ceval.c: implement fast path for integers with a single digit

2016-02-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: People should stop getting hung up about benchmarks numbers and instead should first think about what they are trying to *achieve*. FP performance in pure Python does not seem like an important goal in itself. Also, some benchmarks may show variations which

[issue23551] IDLE to provide menu link to PIP gui.

2016-02-04 Thread Terry J. Reedy
Terry J. Reedy added the comment: I think an initial version of a pip gui need only install to the Python version running it. The py launcher must discover some version of 'all' Python installs to choose, for instance, the latest 3.x version. I do not know the details, nor which system

[issue26285] Garbage collection of unused input sections from CPython binaries

2016-02-04 Thread STINNER Victor
STINNER Victor added the comment: > Also any name starting with Py_ or _Py_ is an API that may be called by > third-party code, so it shouldn't be removed at all... Right. You cannot remove the following functions, they are part of the public C API (Include/pymem.h). /usr/bin/ld: Removing

[issue21328] Resize doesn't change reported length on create_string_buffer()

2016-02-04 Thread Martin Panter
Martin Panter added the comment: I’m not sure if resize() should change the len(). Dustin, why do you think it should? Not all ctypes objects even implement len(). The len() of 10 seems embedded in the class of the return value: >>> b Also, how would this affect create_unicode_buffer(), if

[issue26285] Garbage collection of unused input sections from CPython binaries

2016-02-04 Thread Alecsandru Patrascu
Alecsandru Patrascu added the comment: Sure, I attached them as files because they have a lot of lines for posting here (~90 in total). The linker offers the possibility to show what piece of data/functions was removed, but I intentionally omitted it in order not to clutter the build trace.

[issue26285] Garbage collection of unused input sections from CPython binaries

2016-02-04 Thread Alecsandru Patrascu
Changes by Alecsandru Patrascu : Added file: http://bugs.python.org/file41809/gc-removed-cpython3.txt ___ Python tracker ___

[issue26280] ceval: Optimize [] operation similarly to CPython 2.7

2016-02-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: > I'm pretty sure that optimizing lists (and tuples?) is a great idea. I think it's a good idea indeed. > It would also be nice to optimize [-1] lookup How is that different from the above? :) -- nosy: +pitrou ___

[issue20160] broken ctypes calling convention on MSVC / 64-bit Windows (large structs)

2016-02-04 Thread Mark Lawrence
Changes by Mark Lawrence : -- nosy: -BreamoreBoy ___ Python tracker ___ ___

[issue26291] Floating-point arithmetic

2016-02-04 Thread good.bad
New submission from good.bad: print(1 - 0.8) 0.19996 print(1 - 0.2) 0.8 why not 0.2? -- messages: 259622 nosy: goodbad priority: normal severity: normal status: open title: Floating-point arithmetic versions: Python 3.5 ___ Python

[issue1927] raw_input behavior incorrect if readline not enabled

2016-02-04 Thread Martin Panter
Martin Panter added the comment: Okay, I see. To clarify, it is Python that sets up Gnu Readline for stdout: . The problem is whichever way we go, we will have to change some part of the behaviour to make it internally

[issue1927] raw_input behavior incorrect if readline not enabled

2016-02-04 Thread Martin Panter
Martin Panter added the comment: Okay, I see. To clarify, it is Python that sets up Gnu Readline for stdout: . The problem is whichever way we go, we will have to change some part of the behaviour to make it internally

[issue22847] Improve method cache efficiency

2016-02-04 Thread Benjamin Peterson
Benjamin Peterson added the comment: I suppose we've backported scarier things. -- resolution: -> fixed status: open -> closed ___ Python tracker ___

[issue1927] raw_input behavior incorrect if readline not enabled

2016-02-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This is rather an objection. If Gnu Readline is configured for stdout, why bash outputs to stderr? We should investigate what exactly do bash and other popular programs with readline, and implement this in Python. Changing the documentation usually is a

[issue17446] doctest test finder doesnt find line numbers of properties

2016-02-04 Thread Michael Cuthbert
Michael Cuthbert added the comment: The test looks great to me. Does anyone on nosy know the proper way to request a patch review? -- ___ Python tracker

[issue21955] ceval.c: implement fast path for integers with a single digit

2016-02-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: Hi Yury, > I'm not sure how to respond to that. Every performance aspect *is* > important. Performance is not a religion (not any more than security or any other matter). It is not helpful to brandish results on benchmarks which have no relevance to

[issue1927] raw_input behavior incorrect if readline not enabled

2016-02-04 Thread Martin Panter
Martin Panter added the comment: Serhiy, was your comment an objection to changing away from stderr, or was that just an observation that Python’s design is inconsistent with the rest of the world? -- ___ Python tracker

[issue12923] test_urllib fails in refleak mode

2016-02-04 Thread Roundup Robot
Roundup Robot added the comment: New changeset eb69070e5382 by Martin Panter in branch '3.5': Issue #12923: Reset FancyURLopener's redirect counter even on exception https://hg.python.org/cpython/rev/eb69070e5382 New changeset a8aa7944c5a8 by Martin Panter in branch '2.7': Issue #12923: Reset

[issue26287] Core dump in f-string with lambda and format specification

2016-02-04 Thread Petr Viktorin
New submission from Petr Viktorin: Evaluating the expression f"{(lambda: 0):x}" crashes Python. $ ./python Python 3.6.0a0 (default, Feb 5 2016, 02:14:48) [GCC 5.3.1 20151207 (Red Hat 5.3.1-2)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> f"{(lambda:

[issue21955] ceval.c: implement fast path for integers with a single digit

2016-02-04 Thread Yury Selivanov
Yury Selivanov added the comment: tl;dr I'm attaching a new patch - fastint4 -- the fastest of them all. It incorporates Serhiy's suggestion to export long/float functions and use them. I think it's reasonable complete -- please review it, and let's get it committed. == Benchmarks ==

[issue12923] test_urllib fails in refleak mode

2016-02-04 Thread Martin Panter
Martin Panter added the comment: One extra change I made to test_redirect_limit_independent() was to stop relying on _urlopener being created before we call urlopen(). As a consequence, in the Python 3 tests I made a wrapper around FancyURLopener to suppress the deprecation warning.

[issue21955] ceval.c: implement fast path for integers with a single digit

2016-02-04 Thread Yury Selivanov
Yury Selivanov added the comment: > People should stop getting hung up about benchmarks numbers and instead > should first think about what they are trying to *achieve*. FP performance in > pure Python does not seem like an important goal in itself. I'm not sure how to respond to that. Every

[issue26280] ceval: Optimize [] operation similarly to CPython 2.7

2016-02-04 Thread Zach Byrne
Zach Byrne added the comment: Ok, I've started on the instrumenting, thanks for that head start, that would have taken me a while to figure out where to call the stats dump function from. Fun fact: BINARY_SUBSCR is called 717 starting python. --

[issue26287] Core dump in f-string with lambda and format specification

2016-02-04 Thread Martin Panter
Martin Panter added the comment: I had to recompile with “--with-pydebug” to get the crash. I know f-strings don’t support the lambda syntax very well, but I can also make it crash without using lambda: >>> f"{ {1: 2}:x}" Fatal Python error: Python/ceval.c:3576 object at 0x7fa32ab030c8 has

[issue21328] Resize doesn't change reported length on create_string_buffer()

2016-02-04 Thread Martin Panter
Martin Panter added the comment: I can’t really comment on the patch, but I’m a bit worried that this is not the purpose of the b_length field. -- stage: -> patch review ___ Python tracker

[issue26288] Optimize PyLong_AsDouble for single-digit longs

2016-02-04 Thread Yury Selivanov
New submission from Yury Selivanov: The attached patch drastically speeds up PyLong_AsDouble for single digit longs: -m timeit -s "x=2" "x*2.2 + 2 + x*2.5 + 1.0 - x / 2.0 + (x+0.1)/(x-0.1)*2 + (x+10)*(x-30)" with patch: 0.414 without: 0.612 spectral_norm: 1.05x faster.The results are

[issue26289] Optimize floor division for ints

2016-02-04 Thread Yury Selivanov
New submission from Yury Selivanov: The attached patch optimizes floor division for ints. ### spectral_norm ### Min: 0.319087 -> 0.289172: 1.10x faster Avg: 0.322564 -> 0.294319: 1.10x faster Significant (t=21.71) Stddev: 0.00249 -> 0.01277: 5.1180x larger -m timeit -s "x=22331"

[issue26290] fileinput and 'for line in sys.stdin' do strange mockery of input buffering

2016-02-04 Thread Don Hatch
New submission from Don Hatch: Iterating over input using either 'for line in fileinput.input():' or 'for line in sys.stdin:' has the following unexpected behavior: no matter how many lines of input the process reads, the loop body is not entered until either (1) at least 8193 chars have been

[issue17446] doctest test finder doesnt find line numbers of properties

2016-02-04 Thread Emanuel Barry
Emanuel Barry added the comment: Left a comment on Rietveld. I don't have time right now to check the test, but I suspect you tested it before submitting the patch, so it should probably be fine. -- nosy: +ebarry stage: -> patch review ___ Python

[issue17446] doctest test finder doesnt find line numbers of properties

2016-02-04 Thread Timo Furrer
Timo Furrer added the comment: Yes, I've tested it. -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue21328] Resize doesn't change reported length on create_string_buffer()

2016-02-04 Thread Tamás Bence Gedai
Tamás Bence Gedai added the comment: I've added a patch, that solves the problem with the built-in len. Even if it turns out that this functionality is not needed, it was quite of a challenge to track down the issue, I've learned a lot. :) Here are some functions, that I looked through, might

[issue21955] ceval.c: implement fast path for integers with a single digit

2016-02-04 Thread Yury Selivanov
Yury Selivanov added the comment: Antoine, FWIW I agree on most of your points :) And yes, numpy, scipy, numba, etc rock. Please take a look at my fastint4.patch. All tests pass, no performance regressions, no crazy inlining of floating point exceptions etc. And yet we have a nice

[issue26291] Floating-point arithmetic

2016-02-04 Thread Emanuel Barry
Emanuel Barry added the comment: This is due to how floating point numbers are handled under the hood. See http://effbot.org/pyfaq/why-are-floating-point-calculations-so-inaccurate.htm and https://docs.python.org/3/tutorial/floatingpoint.html for some useful read about why Python behaves like

[issue20160] broken ctypes calling convention on MSVC / 64-bit Windows (large structs)

2016-02-04 Thread Christoph Sarnowski
Changes by Christoph Sarnowski : -- nosy: +Christoph Sarnowski ___ Python tracker ___

[issue21955] ceval.c: implement fast path for integers with a single digit

2016-02-04 Thread STINNER Victor
STINNER Victor added the comment: > Why not combine my patch and Serhiy's? First we check if left & right are > both longs. Then we check if they are unicode (for +). And then we have a > fastpath for floats. See my comment on Serhiy's patch. Maybe we can start by check that the type of

[issue26275] perf.py: calibrate benchmarks using time, not using a fixed number of iterations

2016-02-04 Thread Florin Papa
Florin Papa added the comment: I was also talking about the variance/deviation of the mean value displayed by perf.py, sorry if I was unclear. The perf.py output in my previous message showed little difference between the patched and non-patched version. I will also try increasing the number of

[issue26275] perf.py: calibrate benchmarks using time, not using a fixed number of iterations

2016-02-04 Thread STINNER Victor
STINNER Victor added the comment: tl; dr I'm disappointed. According to the statistics module, running the bm_regex_v8.py benchmark more times with more iterations make the benchmark more unstable... I expected the opposite... Patch version 2: * patch also performance/bm_pickle.py * change

[issue26275] perf.py: calibrate benchmarks using time, not using a fixed number of iterations

2016-02-04 Thread STINNER Victor
Changes by STINNER Victor : Added file: http://bugs.python.org/file41804/perf_calibration-2.patch ___ Python tracker ___

[issue21955] ceval.c: implement fast path for integers with a single digit

2016-02-04 Thread Yury Selivanov
Yury Selivanov added the comment: > I agree with Marc-Andre, people doing FP-heavy math in Python use Numpy > (possibly with Numba, Cython or any other additional library). > Micro-optimizing floating-point operations in the eval loop makes little > sense IMO. I disagree. 30% faster floats

[issue21955] ceval.c: implement fast path for integers with a single digit

2016-02-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: Le 04/02/2016 15:18, Yury Selivanov a écrit : > > But it is faster. That's visible on many benchmarks. Even simple timeit oneliners can show that. Probably it's because that such benchmarks usually combine floats and ints, i.e. "2 * smth" instead of "2.0 *

[issue21955] ceval.c: implement fast path for integers with a single digit

2016-02-04 Thread Yury Selivanov
Yury Selivanov added the comment: >> But it is faster. That's visible on many benchmarks. Even simple > timeit oneliners can show that. Probably it's because that such > benchmarks usually combine floats and ints, i.e. "2 * smth" instead of > "2.0 * smth". > > So it's not about FP-related

[issue21955] ceval.c: implement fast path for integers with a single digit

2016-02-04 Thread Yury Selivanov
Yury Selivanov added the comment: Attaching another approach -- fastint5.patch. Similar to what fastint4.patch does, but doesn't export any new APIs. Instead, similarly to abstract.c, it uses type slots directly. -- Added file: http://bugs.python.org/file41815/fastint5.patch

[issue26280] ceval: Optimize [] operation similarly to CPython 2.7

2016-02-04 Thread Yury Selivanov
Yury Selivanov added the comment: Looks like we want to specialize it for lists, tuples, and dicts; as expected. Not so sure about [-1, but I suggest to benchmark it anyways ;) -- ___ Python tracker

[issue26290] fileinput and 'for line in sys.stdin' do strange mockery of input buffering

2016-02-04 Thread Don Hatch
Don Hatch added the comment: Possibly related to http://bugs.python.org/issue1633941 . Note that the matrix of GOOD and BAD versions and input methods is exactly the same for this bug as for that one. To verify: run each of the 6 python commands I mentioned on its own, being sure to type at

[issue26280] ceval: Optimize [] operation similarly to CPython 2.7

2016-02-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Looks as statistics varies from test to test too much. Could you please collect the statistics for running all tests? -- ___ Python tracker

[issue26280] ceval: Optimize [] operation similarly to CPython 2.7

2016-02-04 Thread Zach Byrne
Zach Byrne added the comment: I'll put together something comprehensive in a bit, but here's a quick preview: $ ./python Python 3.6.0a0 (default, Feb 4 2016, 20:08:03) [GCC 4.6.3] on linux Type "help", "copyright", "credits" or "license" for more information. >>> exit() Total BINARY_SUBSCR

[issue21328] Resize doesn't change reported length on create_string_buffer()

2016-02-04 Thread Eryk Sun
Eryk Sun added the comment: You can't reassign the array object's __class__, and you can't modify the array type itself, so I think modifying the internal b_length field of the object is a confused result. Even if you ignore this confusion, it's still not as simple as using the size in

[issue26290] fileinput and 'for line in sys.stdin' do strange mockery of input buffering

2016-02-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: For fileinput see issue15068. -- nosy: +serhiy.storchaka ___ Python tracker ___

[issue26280] ceval: Optimize [] operation similarly to CPython 2.7

2016-02-04 Thread Zach Byrne
Zach Byrne added the comment: One thing I forgot to do was count slices. -- ___ Python tracker ___ ___

[issue1633941] for line in sys.stdin: doesn't notice EOF the first time

2016-02-04 Thread Don Hatch
Don Hatch added the comment: I've reported the unfriendly input withholding that several people have observed and mentioned here as a separate bug: http://bugs.python.org/issue26290 . The symptom is different but I suspect it has exactly the same underlying cause (incorrect use of stdio) and

[issue22847] Improve method cache efficiency

2016-02-04 Thread Roundup Robot
Roundup Robot added the comment: New changeset 6357d851029d by Antoine Pitrou in branch '2.7': Issue #22847: Improve method cache efficiency. https://hg.python.org/cpython/rev/6357d851029d -- ___ Python tracker

[issue26269] zipfile should call lstat instead of stat if available

2016-02-04 Thread SilentGhost
Changes by SilentGhost : -- components: +Extension Modules nosy: +alanmcintyre, serhiy.storchaka, twouters versions: -Python 2.7, Python 3.2, Python 3.3, Python 3.4, Python 3.5 ___ Python tracker

[issue26275] perf.py: calibrate benchmarks using time, not using a fixed number of iterations

2016-02-04 Thread Stefan Krah
Stefan Krah added the comment: In my experience it is very hard to get stable benchmark results with Python. Even long running benchmarks on an empty machine vary: wget http://www.bytereef.org/software/mpdecimal/benchmarks/telco.py wget http://speleotrove.com/decimal/expon180-1e6b.zip unzip

[issue26275] perf.py: calibrate benchmarks using time, not using a fixed number of iterations

2016-02-04 Thread Stefan Krah
Stefan Krah added the comment: I've cut off the highest result in the previous message: Control totals: Actual ['1004737.58', '57628.30', '25042.17'] Expected ['1004737.58', '57628.30', '25042.17'] Elapsed time: 7.304339 $ taskset -c 0 ./python telco.py full --

[issue26275] perf.py: calibrate benchmarks using time, not using a fixed number of iterations

2016-02-04 Thread STINNER Victor
STINNER Victor added the comment: > taskset -c 0 ./python telco.py full Did you see that I just merged Florin's patch to add --affinity parameter to perf.py? :-) You may isolate some CPU cores using the kernel command parameter isolcpus=xxx. I don't think that the core #0 is the best choice,

[issue21955] ceval.c: implement fast path for integers with a single digit

2016-02-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: I agree with Marc-Andre, people doing FP-heavy math in Python use Numpy (possibly with Numba, Cython or any other additional library). Micro-optimizing floating-point operations in the eval loop makes little sense IMO. The point of optimizing integers is that

[issue26275] perf.py: calibrate benchmarks using time, not using a fixed number of iterations

2016-02-04 Thread STINNER Victor
STINNER Victor added the comment: For an older project (Fusil the fuzzer), I wrote a short function to sleep until the system load is lower than a threshold. I had to write such function to reduce the noise when the system is heavily loaded. I wrote that to be able to run a very long task (it

[issue26275] perf.py: calibrate benchmarks using time, not using a fixed number of iterations

2016-02-04 Thread Stefan Krah
Stefan Krah added the comment: Core 1 fluctuates even more (My machine only has 2 cores): $ taskset -c 1 ./python telco.py full Control totals: Actual ['1004737.58', '57628.30', '25042.17'] Expected ['1004737.58', '57628.30', '25042.17'] Elapsed time: 6.783009 Control totals: Actual

[issue21955] ceval.c: implement fast path for integers with a single digit

2016-02-04 Thread STINNER Victor
STINNER Victor added the comment: > I agree with Marc-Andre, people doing FP-heavy math in Python use Numpy > (possibly with Numba, Cython or any other additional library). > Micro-optimizing floating-point operations in the eval loop makes little > sense IMO. Oh wait, I maybe misunderstood

[issue21955] ceval.c: implement fast path for integers with a single digit

2016-02-04 Thread Stefan Krah
Stefan Krah added the comment: I mean, if you run the benchmark 10 times and the unpatched result is always between 11.3 and 12.0 for floats while the patched result is between 12.3 and 12.9, for me the situation is clear. -- ___ Python tracker

[issue26285] Garbage collection of unused input sections from CPython binaries

2016-02-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: I'm surprised about the speedups. Is there a logical reason for them? -- nosy: +pitrou ___ Python tracker ___

[issue26275] perf.py: calibrate benchmarks using time, not using a fixed number of iterations

2016-02-04 Thread STINNER Victor
STINNER Victor added the comment: Florin Papa added the comment: > I ran perf to use calibration and there is no difference in stability > compared to the unpatched version. Sorry, what are you calling "stability"? For me, stability means that you run the same benchmark 3, 5 or 10 times, and

[issue21955] ceval.c: implement fast path for integers with a single digit

2016-02-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: Le 04/02/2016 14:54, Yury Selivanov a écrit : > > 30% faster floats (sic!) is a serious improvement, that shouldn't > just be discarded. Many applications have floating point calculations one way > or another, but don't use numpy because it's an overkill. Can

[issue21955] ceval.c: implement fast path for integers with a single digit

2016-02-04 Thread Yury Selivanov
Yury Selivanov added the comment: >But the next question is then the overhead on the "slow" path, which requires >a benchmark too! For example, use a subtype of int. telco is such a benchmark (although it's very unstable). It uses decimals extensively. I've tested it many times on three

[issue26284] FIx telco benchmark

2016-02-04 Thread Stefan Krah
New submission from Stefan Krah: The telco benchmark is unstable. It needs some of Victor's changes from #26275 and probably a larger data set: http://speleotrove.com/decimal/expon180-1e6b.zip is too big for _pydecimal, but the one that is used is probably too small for _decimal. --

[issue21955] ceval.c: implement fast path for integers with a single digit

2016-02-04 Thread Yury Selivanov
Yury Selivanov added the comment: > > Stefan Krah added the comment: > > It's instructive to run ./python Modules/_decimal/tests/bench.py (Hit Ctrl-C > after the first cdecimal result, 5 repetitions or so). > > fastint2.patch speeds up floats enormously and slows down decimal by 6%. >

[issue26285] Garbage collection of unused input sections from CPython binaries

2016-02-04 Thread Alecsandru Patrascu
Changes by Alecsandru Patrascu : Added file: http://bugs.python.org/file41806/cpython3-deadcode-v01.patch ___ Python tracker ___

[issue26285] Garbage collection of unused input sections from CPython binaries

2016-02-04 Thread Alecsandru Patrascu
New submission from Alecsandru Patrascu: Hi all, This is Alecsandru from the Dynamic Scripting Languages Optimization Team at Intel Corporation. I would like to submit a patch that enables garbage collection of unused input sections from the CPython2 and CPython3 binaries, by using the

[issue26285] Garbage collection of unused input sections from CPython binaries

2016-02-04 Thread SilentGhost
Changes by SilentGhost : -- nosy: +benjamin.peterson, brett.cannon, haypo, skrah, yselivanov ___ Python tracker ___

[issue25660] tabs don't work correctly in python repl

2016-02-04 Thread Berker Peksag
Berker Peksag added the comment: Windows issue is a blocker so I suggest reverting 64417e7a1760. We could apply the same fix in readline.c for 3.5.x but it would probably be a bit hackish. -- ___ Python tracker

[issue26186] LazyLoader rejecting use of SourceFileLoader

2016-02-04 Thread Brett Cannon
Brett Cannon added the comment: My current plan is to simply remove the check in 3.5 -- the docs say it's ignored so I don't think it will hurt anything -- and add the warning I proposed in 3.6. What do you think, Antoine? -- ___ Python tracker

[issue26186] LazyLoader rejecting use of SourceFileLoader

2016-02-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: By the way does this mean the LazyLoader won't work with ExtensionFileLoader? That would reduce its usefulness quite a bit. -- ___ Python tracker

[issue26186] LazyLoader rejecting use of SourceFileLoader

2016-02-04 Thread Brett Cannon
Brett Cannon added the comment: You're right, it won't work with extension modules based on how ExtensionFileLoader is structured. -- ___ Python tracker

[issue26285] Garbage collection of unused input sections from CPython binaries

2016-02-04 Thread Stefan Krah
Stefan Krah added the comment: I thought this was the usual telco benchmark instability, but with the patch _decimal *does* seem to be faster in other areas, too. -- ___ Python tracker

[issue26186] LazyLoader rejecting use of SourceFileLoader

2016-02-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: Just stumbled on this very issue while trying to use LazyLoader. -- nosy: +pitrou ___ Python tracker ___

[issue26283] zipfile can not handle the path build by os.path.join()

2016-02-04 Thread SilentGhost
Changes by SilentGhost : -- nosy: +alanmcintyre, serhiy.storchaka, twouters versions: +Python 3.6 -Python 3.4 ___ Python tracker ___

[issue26271] freeze.py makefile uses the wrong flags variables

2016-02-04 Thread SilentGhost
Changes by SilentGhost : -- nosy: +twouters ___ Python tracker ___ ___ Python-bugs-list

[issue21955] ceval.c: implement fast path for integers with a single digit

2016-02-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It is easy to extend fastint_alt.patch to support floats too. Here is new patch. > It's instructive to run ./python Modules/_decimal/tests/bench.py (Hit Ctrl-C > after the first cdecimal result, 5 repetitions or so). Note that this benchmark is not very

[issue21955] ceval.c: implement fast path for integers with a single digit

2016-02-04 Thread Stefan Krah
Stefan Krah added the comment: I've never seen 20% fluctuation in that benchmark between runs. The benchmark is very stable if you take the average of 10 runs. -- ___ Python tracker

[issue21955] ceval.c: implement fast path for integers with a single digit

2016-02-04 Thread Stefan Krah
Stefan Krah added the comment: It's instructive to run ./python Modules/_decimal/tests/bench.py (Hit Ctrl-C after the first cdecimal result, 5 repetitions or so). fastint2.patch speeds up floats enormously and slows down decimal by 6%. fastint_alt.patch slows down float *and* decimal (5% or

[issue21328] Resize doesn't change reported length on create_string_buffer()

2016-02-04 Thread Gedai Tamás Bence
Gedai Tamás Bence added the comment: I found out that if you modify Modules/_cpython/callproc.c resize function in a way that you set the obj->b_length to size, the len function returns the correct value. To be able to provide a proper patch, I'd like to look into len's implementation, can

[issue26275] perf.py: calibrate benchmarks using time, not using a fixed number of iterations

2016-02-04 Thread Brett Cannon
Brett Cannon added the comment: What would happen if we shifted to counting the number of executions within a set amount of time instead of how fast a single execution occurred? I believe some JavaScript benchmarks started to do this about a decade ago when they realized CPUs were getting so

[issue26186] LazyLoader rejecting use of SourceFileLoader

2016-02-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: I don't know what the impact of the error is, but it seems like at least the default loader classes should be able to work with LazyLoader... -- ___ Python tracker

[issue25660] tabs don't work correctly in python repl

2016-02-04 Thread Yury Selivanov
Yury Selivanov added the comment: Everything should be OK now (both broken tests and using rlcompleter on Windows). Please confirm. -- ___ Python tracker

[issue6953] readline documentation needs work

2016-02-04 Thread Berker Peksag
Berker Peksag added the comment: Looks good to me. I left a comment on Rietveld. -- nosy: +berker.peksag versions: -Python 3.4 ___ Python tracker ___

[issue26133] asyncio: ugly error related to signal handlers at exit if the loop is not closed explicitly

2016-02-04 Thread Hans Lellelid
Hans Lellelid added the comment: FWIW, I am experiencing the issue described here with Python 3.5.1. -- nosy: +Hans Lellelid ___ Python tracker ___

[issue26285] Garbage collection of unused input sections from CPython binaries

2016-02-04 Thread Alecsandru Patrascu
Alecsandru Patrascu added the comment: I realize now that I should have explained a bit more the background of this patch. I'll do this now, for everyone to be clear of what is the effect of those flags. This issue was revealed after running the coverage target over various workloads, for

  1   2   >