[issue13355] random.triangular error when low = mode

2011-11-06 Thread Mark
New submission from Mark : When low and mode are the same in random.triangular it gives the following error: : float division args = ('float division',) message = 'float division' When high and mode are the same there is no problem. -- component

[issue13355] random.triangular error when low = mode

2011-11-06 Thread Mark
Mark added the comment: Many thanks, Mark. I'm very new to python so apologies for my obvious mistake (you were absolutely right, I was feeding the high and mode in back to front). As a separate aside, it would be convenient if low=high=mode returned low (or mode or high) rather than

[issue3437] robotparser.py missing one line

2008-07-24 Thread mARK
New submission from mARK <[EMAIL PROTECTED]>: RobotFileParser.parse() contains the lines elif line[0] == "disallow": if state != 0: entry.rulelines.append(RuleLine(line[1], False)) state = 2

[issue7904] urllib.urlparse mishandles novel schemes

2010-02-10 Thread mARK
New submission from mARK : urlparse.urlsplit('s3://example/files/photos/161565.jpg') returns ('s3', '', '//example/files/photos/161565.jpg', '', '') instead of ('s3', 'example', '/files/photos/161565.jpg'

[issue7904] urllib.urlparse mishandles novel schemes

2010-02-10 Thread mARK
mARK added the comment: it's not actually necessary to have a list of known schemes. any url that has a double slash after the colon is expected to follow that with an authority section (what urlparse calls "netloc"), optionally followed by a path, which starts with a sl

[issue7904] urlparse.urlsplit mishandles novel schemes

2010-02-11 Thread mARK
mARK added the comment: i have attached an svn diff of my (very simple!) fix and added unit test for python 2.7. -- title: urllib.urlparse mishandles novel schemes -> urlparse.urlsplit mishandles novel schemes Added file: http://bugs.python.org/file16212/fix7904.

[issue7904] urlparse.urlsplit mishandles novel schemes

2010-02-12 Thread mARK
mARK added the comment: The case which prompted this issue was a purely private set of URLs, sent to me by a client but never sent to Amazon or anywhere else outside our systems (though I'm sure many others have invented this particular scheme for their own use). It would have

[issue7904] urlparse.urlsplit mishandles novel schemes

2010-02-12 Thread mARK
Changes by mARK : -- components: +Library (Lib) -Extension Modules versions: +Python 3.1, Python 3.2 ___ Python tracker <http://bugs.python.org/issue7904> ___ ___

[issue7904] urlparse.urlsplit mishandles novel schemes

2010-02-17 Thread mARK
mARK added the comment: Doing a fallback test for // would look like if scheme in uses_netloc and url[:2] == '//' or url[:2] == '//': but this is equivalent to if url[:2] == '//': i.e., an authority appears if and only if there is a // after the scheme. T

[issue38741] Definition of multiple ']' in header configparser

2019-11-07 Thread Mark
New submission from Mark : in example header is "[i love [python] lang]" parse as "i love [python", only up to the first character ']'. now saving works correctly, but reading does not -- messages: 356225 nosy: @mark99i priority: normal severity: normal

[issue45134] Protocol dealloc not called if Server is closed

2021-09-07 Thread Mark
New submission from Mark : If I create_server server_coro = loop.create_server( lambda: self._protocol_factory(self), sock=sock, ssl=ssl) server = loop.run_until_complete(server_coro) Then connect and disconnect a client the protocol connection lost and dealloc are called. If

[issue45134] Protocol dealloc not called if Server is closed

2021-09-18 Thread Mark
Change by Mark : -- stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue45134> ___ ___ Python-bugs-list mailing list

[issue29926] time.sleep ignores keyboard interrupt in IDLE

2017-03-27 Thread Mark
New submission from Mark: Consider the following code, typed interactively: >>> import time >>> time.sleep(1e6) This will sleep for a bit over one and a half weeks. If this was typed in error, you may want to interrupt it. If using the command line, this is easy: just use

[issue32362] multiprocessing.connection.Connection misdocumented as multiprocessing.Connection

2017-12-18 Thread Mark
New submission from Mark : https://docs.python.org/3/library/multiprocessing.html#multiprocessing.Connection purports to document the multiprocessing.Connection class. There's no such thing: Python 3.6.1 (v3.6.1:69c0db5050, Mar 21 2017, 01:21:04) [GCC 4.2.1 (Apple Inc. build 5666) (

[issue15262] Idle does not show traceback in other threads

2012-07-06 Thread Mark
New submission from Mark : Consider the following code: from thread import start_new def f(): typo #there is no variable called typo start_new(f, ()) If run from the command line, this produces a traceback. If run from IDLE, it does not. I suspect this is not by design. This caused me

[issue15262] Idle does not show traceback in other threads

2012-07-06 Thread Mark
Mark added the comment: So, I should not hold my breath in the hope of this being fixed in 2.7? -- ___ Python tracker <http://bugs.python.org/issue15262> ___ ___

[issue15262] Idle does not show traceback in other threads

2012-07-09 Thread Mark
Mark added the comment: Yay! I can't wait :) -- ___ Python tracker <http://bugs.python.org/issue15262> ___ ___ Python-bugs-list mailing list Unsubsc

[issue4108] robotparser.py fail when more than one User-Agent: * is present

2009-06-04 Thread mARK
mARK added the comment: this looks like a good fix. i've put it into my own copy. -- nosy: +mbloore ___ Python tracker <http://bugs.python.org/i

[issue29317] test_copyxattr_symlinks fails

2017-01-18 Thread mark
New submission from mark: == ERROR: test_copyxattr_symlinks (test.test_shutil.TestShutil) -- Traceback (most recent call last): File "/opt/Python-3.6.

[issue27324] Error when building Python extension

2016-06-15 Thread Mark
New submission from Mark: I'd like to build a C++ extension for Python. I took a simple C file from a tutorial and wrote the setup.py file. But when I run the command: python setup.py build_ext --inplace I get the following error: error: Unable to find vcvarsall.bat This file is located

[issue27324] Error when building Python extension

2016-06-15 Thread Mark
Mark added the comment: Hi Zach, Well, the strange thing is that other members of my team have successfully built C++ Python extensions with Visual Studio 13, but they compiled and built  the pyd file with CMake (one used SWIG). So, it is possible. I just wanted to  do it in a simpler way

[issue27324] Error when building Python extension

2016-06-16 Thread Mark
Mark added the comment: The problem is that I don't have the choice, the compiler we use for the project is VS13. Anyway, my colleagues are aware of this limitation but they could build their extensions all the same. I set the variables as you recommended, and the obj files have been cr

[issue24875] pyvenv doesn´t install PIP inside a new venv with --system-site-package

2016-07-25 Thread Mark
Mark added the comment: I have the same problem on a standard installation of Python 3.5 (on OS X via Homebrew). This bug is almost a year old, and it is a doozy: it utterly defeats the purpose of --system-site-packages. In the hope of getting some momentum going, I tried out the option

[issue29988] with statements are not ensuring that __exit__ is called if __enter__ succeeds

2021-12-10 Thread Mark Shannon
Change by Mark Shannon : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue46039] Break up the YIELD_FROM instruction.

2021-12-10 Thread Mark Shannon
New submission from Mark Shannon : The YIELD_FROM instruction does three things: * It sends a value to the sub-iterator * It yields the value from the sub-iterator back up to its caller * Loops back on itself So we should implement this as: SEND<--+ YIELD_VALUE| JUMP_ABSOL

[issue46039] Break up the YIELD_FROM instruction.

2021-12-10 Thread Mark Shannon
Change by Mark Shannon : -- keywords: +patch pull_requests: +28260 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30035 ___ Python tracker <https://bugs.python.org/issu

[issue46072] Unify handling of stats in the CPython VM

2021-12-14 Thread Mark Shannon
New submission from Mark Shannon : By "stats" I mean the internal numbers gathered by the VM for performance and debugging. This has nothing to do with any statistics module. Currently various parts of the VM gather stats: the GC, dicts, the bytecode interpreter, type lookup

[issue44525] Implement CALL_FUNCTION adaptive interpreter optimizations

2021-12-14 Thread Mark Shannon
Mark Shannon added the comment: New changeset 9f8f45144b6f0ad481e80570538cce89b414f7f9 by Mark Shannon in branch 'main': bpo-44525: Split calls into PRECALL and CALL (GH-30011) https://github.com/python/cpython/commit/9f8f45144b6f0ad481e80570538cce

[issue44525] Implement CALL_FUNCTION adaptive interpreter optimizations

2021-12-14 Thread Mark Shannon
Change by Mark Shannon : -- pull_requests: +28329 pull_request: https://github.com/python/cpython/pull/30107 ___ Python tracker <https://bugs.python.org/issue44

[issue45292] Implement PEP 654: Exception Groups

2021-12-14 Thread Mark Shannon
Mark Shannon added the comment: PR 29581 resulted in a 1% slowdown, which is not terrible, but code not using except* should not be slowed down at all. IMO, the way to avoid the slowdown is to implement except* using the existing instruction set (perhaps with a few minor additions) We

[issue46039] Break up the YIELD_FROM instruction.

2021-12-15 Thread Mark Shannon
Mark Shannon added the comment: New changeset 0b50a4f0cdee41a18fb4ba6e75569f9cfaceb39e by Mark Shannon in branch 'main': bpo-46039: Split yield from in two (GH-30035) https://github.com/python/cpython/commit/0b50a4f0cdee41a18fb4ba6e75569f

[issue46072] Unify handling of stats in the CPython VM

2021-12-15 Thread Mark Shannon
Change by Mark Shannon : -- keywords: +patch pull_requests: +28338 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30116 ___ Python tracker <https://bugs.python.org/issu

[issue44525] Implement CALL_FUNCTION adaptive interpreter optimizations

2021-12-15 Thread Mark Shannon
Mark Shannon added the comment: New changeset 3a60bfef49b3324660a615a8e6d10710e5f669d9 by Mark Shannon in branch 'main': bpo-44525: Specialize for calls to type and other builtin classes with 1 argument. (GH-29942) https://github.com/python/cpyt

[issue46072] Unify handling of stats in the CPython VM

2021-12-15 Thread Mark Shannon
Mark Shannon added the comment: New changeset 342b93f9f28746abb7b221a61d5a9b26ccbb395a by Mark Shannon in branch 'main': bpo-46072: Add --with-pystats configure option to simplify gathering of VM stats (GH-30116) https://github.com/python/cpyt

[issue46006] [subinterpreter] _PyUnicode_EqualToASCIIId() issue with subinterpreters

2021-12-15 Thread Mark Shannon
Mark Shannon added the comment: The problem here is that different sub-interpreters have different strings for the same Python string. Unless sub-interpreters are fully independent, and they cannot be due to limitations imposed by the stable API, then all sub-interpreters must share the

[issue46097] Split function versions into 1-0xffff and 0x1000+ regions

2021-12-16 Thread Mark Shannon
New submission from Mark Shannon : Because functions are mutable, specifically because the __code__ attribute is mutable, we need to version functions when specializing. However, some specializations (for special methods mainly) only have space for 16 bit versions. It is likely that

[issue45829] Remove C stack use by specializing BINARY_SUBSCR, STORE_SUBSCR, LOAD_ATTR, and STORE_ATTR

2021-12-16 Thread Mark Shannon
Mark Shannon added the comment: New changeset 62a8a0c5223f750e22ee381d3cfbdb718cf1cc93 by Brandt Bucher in branch 'main': bpo-45829: Check `__getitem__`'s version for overflow before specializing (GH-30129) https://github.com/python/cpython/commit/62a8a0c5223f750e22ee381d3

[issue46072] Unify handling of stats in the CPython VM

2021-12-16 Thread Mark Shannon
Change by Mark Shannon : -- pull_requests: +28357 pull_request: https://github.com/python/cpython/pull/30139 ___ Python tracker <https://bugs.python.org/issue46

[issue46072] Unify handling of stats in the CPython VM

2021-12-16 Thread Mark Shannon
Mark Shannon added the comment: New changeset 4506bbede1644e985991884964b43afa7ee6f609 by Mark Shannon in branch 'main': bpo-46072: Document --enable-stats option. (GH-30139) https://github.com/python/cpython/commit/4506bbede1644e985991884964b43a

[issue23522] Misleading note in Statistics module documentation

2021-12-16 Thread Mark Dickinson
Change by Mark Dickinson : -- nosy: +mark.dickinson ___ Python tracker <https://bugs.python.org/issue23522> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46072] Unify handling of stats in the CPython VM

2021-12-16 Thread Mark Shannon
Mark Shannon added the comment: The --enable-stats option is for CPython development and shouldn't be turned on for a release version, so I'm not really concerned about people attacking their own machines. -- ___ Python track

[issue46072] Unify handling of stats in the CPython VM

2021-12-16 Thread Mark Shannon
Change by Mark Shannon : -- pull_requests: +28363 pull_request: https://github.com/python/cpython/pull/30145 ___ Python tracker <https://bugs.python.org/issue46

[issue23522] Misleading note in Statistics module documentation

2021-12-16 Thread Mark Dickinson
Mark Dickinson added the comment: > "The mean is strongly affected by outliers and is not necessarily a typical > example of the data points. For a more robust, although less efficient, > measure of central tendency, see median()" That wording sounds fine to me. I

[issue46072] Unify handling of stats in the CPython VM

2021-12-17 Thread Mark Shannon
Change by Mark Shannon : -- pull_requests: +28386 pull_request: https://github.com/python/cpython/pull/30169 ___ Python tracker <https://bugs.python.org/issue46

[issue45711] Simplify the interpreter's (type, val, tb) exception representation

2021-12-17 Thread Mark Shannon
Mark Shannon added the comment: New changeset 396b58345f81d4c8c5a52546d2288e666a1b9b8b by Irit Katriel in branch 'main': bpo-45711: Remove type and traceback from exc_info (GH-30122) https://github.com/python/cpython/commit/396b58345f81d4c8c5a52546d2288e

[issue46072] Unify handling of stats in the CPython VM

2021-12-17 Thread Mark Shannon
Mark Shannon added the comment: New changeset efd6236d36b292c2c43540132c87cf8425e8d627 by Mark Shannon in branch 'main': bpo-46072: Add top level stats struct (GH-30169) https://github.com/python/cpython/commit/efd6236d36b292c2c43540132c87cf

[issue23522] Misleading note in Statistics module documentation

2021-12-17 Thread Mark Dickinson
Change by Mark Dickinson : -- pull_requests: +28390 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30174 ___ Python tracker <https://bugs.python.org/issu

[issue23522] Misleading note in Statistics module documentation

2021-12-17 Thread Mark Dickinson
Mark Dickinson added the comment: Steven: I've made a PR at https://github.com/python/cpython/pull/30174. Does this match what you had in mind? -- ___ Python tracker <https://bugs.python.org/is

[issue45995] string formatting: normalize negative zero

2021-12-17 Thread Mark Dickinson
Change by Mark Dickinson : -- assignee: -> mark.dickinson ___ Python tracker <https://bugs.python.org/issue45995> ___ ___ Python-bugs-list mailing list Un

[issue45995] string formatting: normalize negative zero

2021-12-17 Thread Mark Dickinson
Mark Dickinson added the comment: Thanks, John. I should have time to review within the next week or so. -- ___ Python tracker <https://bugs.python.org/issue45

[issue37295] Possible optimizations for math.comb()

2021-12-20 Thread Mark Dickinson
Mark Dickinson added the comment: > we can get faster code by using a small (3Kb) table of factorial logarithms The problem here is that C gives no guarantees about accuracy of either log2 or exp2, so we'd be playing a guessing game about how far we can go before the calculation

[issue37295] Possible optimizations for math.comb()

2021-12-21 Thread Mark Dickinson
Mark Dickinson added the comment: One approach that avoids the use of floating-point arithmetic is to precompute the odd part of the factorial of n modulo 2**64, for all small n. If we also precompute the inverses, then three lookups and two 64x64->64 unsigned integer multiplications g

[issue46144] math.log() returns improper output

2021-12-21 Thread Mark Dickinson
Mark Dickinson added the comment: Yes, confirmed that this is not a bug, but just one of the many consequences of approximating real numbers by floating-point numbers. You may be interested in math.log2 and/or int.bit_length. math.log2(x) *may* give you more accurate results than math.log

[issue37295] Possible optimizations for math.comb()

2021-12-21 Thread Mark Dickinson
Mark Dickinson added the comment: That computation of the shift can be simplified to require only one popcount operation. With F and Finv as before: def comb_small(n, k): assert 0 <= k <= n <= Nmax return (F[n] * Finv[k] * Finv[n-k] % 2**64) << (k ^ n ^ (

[issue23522] Misleading note in Statistics module documentation

2021-12-21 Thread Mark Dickinson
Change by Mark Dickinson : -- stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue23522> ___ ___ Pyth

[issue37295] Possible optimizations for math.comb()

2021-12-22 Thread Mark Dickinson
Mark Dickinson added the comment: [Tim] > The justification for the shift count isn't self-evident, and > appears to me to be an instance of the generalization of Kummer's > theorem to multinomial coefficients. Not sure there's any generalisation here: I think it *is

[issue35037] PYLONG_BITS_IN_DIGIT differs between MinGW and MSVC

2021-12-22 Thread Mark Dickinson
Mark Dickinson added the comment: > This should probably be a separate issue, Specifically, issue 45569. -- ___ Python tracker <https://bugs.python.org/issu

[issue20369] concurrent.futures.wait() blocks forever when given duplicate Futures

2021-12-22 Thread Mark Dickinson
Change by Mark Dickinson : -- nosy: -mark.dickinson ___ Python tracker <https://bugs.python.org/issue20369> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46055] Speed up binary shifting operators

2021-12-23 Thread Mark Dickinson
Change by Mark Dickinson : -- nosy: +mark.dickinson ___ Python tracker <https://bugs.python.org/issue46055> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46055] Speed up binary shifting operators

2021-12-23 Thread Mark Dickinson
Change by Mark Dickinson : -- keywords: +patch pull_requests: +28464 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30243 ___ Python tracker <https://bugs.python.org/issu

[issue37295] Possible optimizations for math.comb()

2021-12-23 Thread Mark Dickinson
Mark Dickinson added the comment: Raymond: how do you want to proceed on this? Should I code up my suggestion in a PR, or are you already working on it? -- ___ Python tracker <https://bugs.python.org/issue37

[issue46173] float(x) with large x not raise OverflowError

2021-12-24 Thread Mark Dickinson
Mark Dickinson added the comment: Yes, exactly: Python's intentionally following the normal IEEE 754 rules for rounding a value to the binary64 format using the round-ties-to-even rounding rule, as formalised in section 7.4 of IEEE 754-2019 (and quoted by @cykerway). These are the

[issue46173] float(x) with large x not raise OverflowError

2021-12-24 Thread Mark Dickinson
Mark Dickinson added the comment: If we wanted to make a change, I think the part of the docs that I'd target would be this sentence: > a floating point number with the same value (within Python’s floating point > precision) is returned It's that "same value (within Py

[issue46173] float(x) with large x not raise OverflowError

2021-12-24 Thread Mark Dickinson
Change by Mark Dickinson : -- resolution: -> not a bug ___ Python tracker <https://bugs.python.org/issue46173> ___ ___ Python-bugs-list mailing list Un

[issue46173] Clarify conditions under which float(x) with large x raises OverflowError

2021-12-25 Thread Mark Dickinson
Mark Dickinson added the comment: Changing to a documentation issue. -- assignee: -> docs@python components: +Documentation -Interpreter Core nosy: +docs@python resolution: not a bug -> title: float(x) with large x not raise OverflowError -> Clarify conditions under whic

[issue37295] Possible optimizations for math.comb()

2021-12-27 Thread Mark Dickinson
Change by Mark Dickinson : -- pull_requests: +28490 pull_request: https://github.com/python/cpython/pull/30275 ___ Python tracker <https://bugs.python.org/issue37

[issue46055] Speed up binary shifting operators

2021-12-27 Thread Mark Dickinson
Mark Dickinson added the comment: New changeset 360fedc2d2ce6ccb0dab554ef45fe83f7aea1862 by Mark Dickinson in branch 'main': bpo-46055: Streamline inner loop for right shifts (#30243) https://github.com/python/cpython/commit/360fedc2d2ce6ccb0dab554ef45fe8

[issue46055] Speed up binary shifting operators

2021-12-27 Thread Mark Dickinson
Mark Dickinson added the comment: New changeset 3581c7abbe15bad6ae08fc38887e5948f8f39e08 by Xinhang Xu in branch 'main': bpo-46055: Speed up binary shifting operators (GH-30044) https://github.com/python/cpython/commit/3581c7abbe15bad6ae08fc38887e59

[issue46055] Speed up binary shifting operators

2021-12-27 Thread Mark Dickinson
Mark Dickinson added the comment: Two separate significant improvements have been pushed: thanks, Xinhang Xu! The original PR also contained a reworking of the general case for right-shifting a negative integer. The current code (in main) for that case does involve some extra allocations

[issue46187] Optionally support rounding for math.isqrt()

2021-12-27 Thread Mark Dickinson
Mark Dickinson added the comment: FWIW, when this need has turned up for me (which it has, a couple of times), I've used this: def risqrt(n): return (isqrt(n<<2) + 1) >> 1 But I'll admit that that's a bit non-obvious. -- ___

[issue46055] Speed up binary shifting operators

2021-12-27 Thread Mark Dickinson
Change by Mark Dickinson : -- pull_requests: +28493 pull_request: https://github.com/python/cpython/pull/30277 ___ Python tracker <https://bugs.python.org/issue46

[issue37295] Possible optimizations for math.comb()

2021-12-28 Thread Mark Dickinson
Mark Dickinson added the comment: New changeset 02b5417f1107415abaf81acab7522f9aa84269ea by Mark Dickinson in branch 'main': bpo-37295: Speed up math.comb(n, k) for 0 <= k <= n <= 67 (GH-30275) https://github.com/python/cpython/commit/02b5417f1107415abaf81

[issue46203] Add timeout for Windows build steps

2021-12-30 Thread Mark Dickinson
New submission from Mark Dickinson : Recently there was an upstream issue with GitHub Actions that caused the Windows build steps in build.yml to hang. No output for the step was displayed in the build logs until the entire job was eventually cancelled, after the default step timeout of 6

[issue46203] Add timeout for Windows build steps

2021-12-30 Thread Mark Dickinson
Change by Mark Dickinson : -- keywords: +patch pull_requests: +28513 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30301 ___ Python tracker <https://bugs.python.org/issu

[issue37295] Possible optimizations for math.comb()

2021-12-30 Thread Mark Dickinson
Mark Dickinson added the comment: > So which of xor-popcount and add-up-up-trailing-zero-counts is faster may > well depend on platform. I ran some timings for comb(k, 67) on my macOS / Intel MacBook Pro, using timeit to time calls to a function that looked like this: def f(comb):

[issue46187] Optionally support rounding for math.isqrt()

2021-12-30 Thread Mark Dickinson
Mark Dickinson added the comment: > did you invent this? The idea is no more than: "compute an extra bit, then use that extra bit to determine which way to round". More generally, for any real number x, the nearest integer to x (rounding ties towards +infinity) is `⌊(⌊2x⌋ + 1

[issue46187] Optionally support rounding for math.isqrt()

2021-12-30 Thread Mark Dickinson
Mark Dickinson added the comment: > I'd be happy to see recipes added to the docs for rounded and ceiling flavors > of isqrt, but am dubious about the value of building them in. I'd similarly prefer to see recipes in the docs. We already have such a rec

[issue45569] Drop support for 15-bit PyLong digits?

2021-12-30 Thread Mark Dickinson
Mark Dickinson added the comment: I posted a request for information on usage of 15-bit digits to python-dev: https://mail.python.org/archives/list/python-...@python.org/thread/ZICIMX5VFCX4IOFH5NUPVHCUJCQ4Q7QM/ -- ___ Python tracker <ht

[issue37295] Possible optimizations for math.comb()

2021-12-30 Thread Mark Dickinson
Mark Dickinson added the comment: > I'm assuming you meant to write comb(67, k) instead Aargh! That is of course what I meant, but not in fact what I timed. :-( I'll redo the timings. Please disregard the previous message. -- ___ P

[issue37295] Possible optimizations for math.comb()

2021-12-30 Thread Mark Dickinson
Mark Dickinson added the comment: Thanks Tim for spotting the stupid mistake. The reworked timings are a bit more ... plausible. tl;dr: On my machine, Raymond's suggestion gives a 2.2% speedup in the case where POPCNT is not available, and a 0.45% slowdown in the case that it

[issue37295] Possible optimizations for math.comb()

2021-12-30 Thread Mark Dickinson
Change by Mark Dickinson : Added file: https://bugs.python.org/file50531/driver.py ___ Python tracker <https://bugs.python.org/issue37295> ___ ___ Python-bugs-list mailin

[issue45569] Drop support for 15-bit PyLong digits?

2021-12-30 Thread Mark Dickinson
Change by Mark Dickinson : -- keywords: +patch pull_requests: +28519 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30306 ___ Python tracker <https://bugs.python.org/issu

[issue45569] Drop support for 15-bit PyLong digits?

2021-12-30 Thread Mark Dickinson
Mark Dickinson added the comment: Terry: > create a fake test file test/test_xintperf [...] Sounds reasonable, though I'm not sure I know what exact timings I'd want to try. Maybe some of the stock integer-heavy Python benchmarks (pidigits, etc.). I realised that I have no ide

[issue45569] Drop support for 15-bit PyLong digits?

2021-12-31 Thread Mark Dickinson
Mark Dickinson added the comment: > I've created PR GH-30306 to find out. Results: we have two Gentoo/x86 buildbots, and a 32-bit Windows build in GitHub Actions: those machines use 15-bit digits, as a result of the logic in pyport.h that chooses 15-bit digits if SIZEOF_VO

[issue37295] Possible optimizations for math.comb()

2021-12-31 Thread Mark Dickinson
Change by Mark Dickinson : -- pull_requests: +28529 pull_request: https://github.com/python/cpython/pull/30313 ___ Python tracker <https://bugs.python.org/issue37

[issue37295] Possible optimizations for math.comb()

2021-12-31 Thread Mark Dickinson
Mark Dickinson added the comment: > I'd be happy to change the implementation to use the trailing zero counts as > suggested. Done in GH-30313 (though this will conflict with Serhiy's PR). -- ___ Python tracker <http

[issue46187] Optionally support rounding for math.isqrt()

2021-12-31 Thread Mark Dickinson
Mark Dickinson added the comment: A new function isqrt_rem seems like a reasonably natural addition. (Though I'd call it "isqrtrem", partly by analogy with "divmod", and partly because the math module isn't

[issue46187] Optionally support rounding for math.isqrt()

2021-12-31 Thread Mark Dickinson
Mark Dickinson added the comment: > Mark didn't mention his use case for rounded isqrt Mainly for emulation of floating-point sqrt. But the number of times I've needed rounded integer square root is small compared with the number of times I've needed rounde

[issue37295] Possible optimizations for math.comb()

2021-12-31 Thread Mark Dickinson
Mark Dickinson added the comment: New changeset 0b58bac3e7877d722bdbd3c38913dba2cb212f13 by Mark Dickinson in branch 'main': bpo-37295: More direct computation of power-of-two factor in math.comb (GH-30313) https://github.com/python/cpython/commit/0b58bac3e7877d722bdbd3c38913db

[issue46199] Calculation influenced by print

2021-12-31 Thread Mark Dickinson
Mark Dickinson added the comment: When you do: FINUB = np.empty(len(close)) FINLB = np.empty(len(close)) you're creating two *uninitialised* arrays of values. (See the NumPy documentation at https://numpy.org/doc/stable/reference/generated/numpy.empty.html.) When you th

[issue46020] Optimize long_pow for the common case

2022-01-02 Thread Mark Dickinson
Change by Mark Dickinson : -- nosy: +tim.peters ___ Python tracker <https://bugs.python.org/issue46020> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45923] Improve performance of sys.settracing based tools.

2022-01-03 Thread Mark Shannon
Change by Mark Shannon : -- keywords: +patch pull_requests: +28578 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30364 ___ Python tracker <https://bugs.python.org/issu

[issue46202] remove opcode POP_EXCEPT_AND_RERAISE

2022-01-04 Thread Mark Shannon
Mark Shannon added the comment: New changeset a94461d7189d7f1147ab304a332c8684263dc17e by Irit Katriel in branch 'main': bpo-46202: Remove opcode POP_EXCEPT_AND_RERAISE (GH-30302) https://github.com/python/cpython/commit/a94461d7189d7f1147ab304a332c8684263dc17e -

[issue46258] Minor algorithmic improvements for math.isqrt

2022-01-04 Thread Mark Dickinson
New submission from Mark Dickinson : There are a couple of minor algorithmic improvements possible for the math.isqrt fast path (which is used for nonnegative integers smaller than 2**64). On my machine those improvements produce a little over a 10% speedup. The current algorithm for values

[issue46258] Minor algorithmic improvements for math.isqrt

2022-01-04 Thread Mark Dickinson
Change by Mark Dickinson : -- keywords: +patch pull_requests: +28612 stage: commit review -> patch review pull_request: https://github.com/python/cpython/pull/30333 ___ Python tracker <https://bugs.python.org/issu

[issue45609] Specialize STORE_SUBSCR

2022-01-04 Thread Mark Shannon
Mark Shannon added the comment: New changeset 7537f6008704b20e2d04a7ef1c0cfa34121cc5eb by Dennis Sweeney in branch 'main': bpo-45609: More specialization stats for STORE_SUBSCR (GH-30193) https://github.com/python/cpython/commit/7537f6008704b20e2d04a7ef1c0cfa

[issue44525] Implement CALL_FUNCTION adaptive interpreter optimizations

2022-01-05 Thread Mark Shannon
Change by Mark Shannon : -- pull_requests: +28621 pull_request: https://github.com/python/cpython/pull/30415 ___ Python tracker <https://bugs.python.org/issue44

[issue43683] Handle generator (and coroutine) state in the bytecode.

2022-01-05 Thread Mark Shannon
Mark Shannon added the comment: Yes, most of it :) We haven't implemented points 2 and 3, yet. I'm in no hurry to implement 3. It would clean up `gen.throw` a lot, and break the dependency between that code and the interpreter, but it isn't urgent. 2 is more urgent. I thin

[issue45256] Remove the usage of the C stack in Python to Python calls

2022-01-05 Thread Mark Shannon
Mark Shannon added the comment: New changeset 332e6b972567debfa9d8f3f9a4a966c7ad15eec9 by Brandt Bucher in branch 'main': bpo-45256: Don't track the exact depth of each `InterpreterFrame` (GH-30372) https://github.com/python/cpython/commit/332e6b972567debfa9d8f3f9a

[issue44525] Implement CALL_FUNCTION adaptive interpreter optimizations

2022-01-05 Thread Mark Shannon
Mark Shannon added the comment: See https://github.com/faster-cpython/ideas/discussions/210 -- ___ Python tracker <https://bugs.python.org/issue44525> ___ ___

  1   2   3   4   5   6   7   8   9   10   >