[Python-Dev] Re: Optimizing pymalloc (was obmalloc

2019-07-09 Thread Neil Schemenauer
On 2019-07-09, Inada Naoki wrote: > So I tried to use LIKELY/UNLIKELY macro to teach compiler hot part. > But I need to use > "static inline" for pymalloc_alloc and pymalloc_free yet [1]. I think LIKELY/UNLIKELY is not helpful if you compile with LTO/PGO enabled. So, I would try that first.

[Python-Dev] Re: Docs: audit event table empty

2019-07-09 Thread Terry Reedy
On 7/9/2019 3:53 PM, Terry Reedy wrote: https://docs.python.org/3.9/library/audit_events.html. Steve and I are going to present the auditing feature tomorrow at EuroPython. That should be interesting. My experiment with the following >>> def audit(event, args): print(event, args) >>>

[Python-Dev] Re: Docs: audit event table empty

2019-07-09 Thread Terry Reedy
On 7/9/2019 6:44 AM, Christian Heimes wrote: Hi, the table with auditing events does not render on docs.python.org, https://docs.python.org/3.9/library/audit_events.html. Steve and I are going to present the auditing feature tomorrow at EuroPython. It would be helpful to have the table

[Python-Dev] Re: Optimizing pymalloc (was obmalloc

2019-07-09 Thread Tim Peters
[Inada Naoki , looking into why mimalloc did so much better on spectral_norm] > I compared "perf" output of mimalloc and pymalloc, and I succeeded to > optimize pymalloc! > > $ ./python bm_spectral_norm.py --compare-to ./python-master > python-master: . 199 ms +- 1 ms >

[Python-Dev] Re: Keyword arguments with non-string names

2019-07-09 Thread Guido van Rossum
Thinking about this, I don't believe allowing non-string keys here are a desirable feature. It's tempting not to check for this in some cases where it does no harm (skipping the check shaves a few microseconds off execution time), but I think the reference manual should require strings here and

[Python-Dev] Re: Keyword arguments with non-string names

2019-07-09 Thread Jeroen Demeyer
Thanks for the pointer, but that's more about allowing strings which are not valid identifiers. I'm talking about passing non-strings and more specifically about the C protocol. For Python functions, non-string keyword arguments are already disallowed, but that's because of the implementation

[Python-Dev] Re: Docs: audit event table empty

2019-07-09 Thread Karthikeyan
On Tue, Jul 9, 2019 at 5:34 PM Julien Palard via Python-Dev < python-dev@python.org> wrote: > Hi Christian, > > > the table with auditing events does not render on docs.python.org, > > https://docs.python.org/3.9/library/audit_events.html. Steve and I are > > going to present the auditing feature

[Python-Dev] Re: Keyword arguments with non-string names

2019-07-09 Thread Janzert
On 7/9/2019 8:50 AM, Jeroen Demeyer wrote: On 2019-07-09 14:36, Jeroen Demeyer wrote: So this leads to the question: should the interpreter check the keys of a **kwargs dict? Some pointers: - https://bugs.python.org/issue8419 - https://bugs.python.org/issue29360 It was also discussed last

[Python-Dev] Re: Further off-topic: webmaster@ volunteers

2019-07-09 Thread Steve Holden
[python-dev -> Bcc] There are questions to answer, but they are mostly of a pretty mundane kind. Technical issues are deflected by the auto-response, which contains many pointers to sources of possible assistance, and so can usually be disregarded or followed up with a simple response underlining

[Python-Dev] Re: Docs: audit event table empty

2019-07-09 Thread Christian Heimes
On 09/07/2019 14.02, Julien Palard wrote: > Hi Christian, > >> the table with auditing events does not render on docs.python.org, >> https://docs.python.org/3.9/library/audit_events.html. Steve and I are >> going to present the auditing feature tomorrow at EuroPython. It would >> be helpful to

[Python-Dev] Optimizing pymalloc (was obmalloc

2019-07-09 Thread Inada Naoki
On Tue, Jul 9, 2019 at 5:29 PM Inada Naoki wrote: > > On Tue, Jul 9, 2019 at 9:46 AM Tim Peters wrote: > > > >> I was more intrigued by your first (speed) comparison: > > > > > - spectral_norm: 202 ms +- 5 ms -> 176 ms +- 3 ms: 1.15x faster (-13%) > > > > Now _that's_ interesting ;-) Looks like

[Python-Dev] Re: Keyword arguments with non-string names

2019-07-09 Thread Jeroen Demeyer
On 2019-07-09 14:36, Jeroen Demeyer wrote: So this leads to the question: should the interpreter check the keys of a **kwargs dict? Some pointers: - https://bugs.python.org/issue8419 - https://bugs.python.org/issue29360 ___ Python-Dev mailing list --

[Python-Dev] Keyword arguments with non-string names

2019-07-09 Thread Jeroen Demeyer
When passing **kwargs to a callable, the expectation is that kwargs is a dict with string keys. The interpreter enforces that it's a dict, but it does NOT check the types of the keys. It's currently the job of the called function to check that. In some cases, this check is not applied: >>>

[Python-Dev] Re: Docs: audit event table empty

2019-07-09 Thread Julien Palard via Python-Dev
Hi Christian, > the table with auditing events does not render on docs.python.org, > https://docs.python.org/3.9/library/audit_events.html. Steve and I are > going to present the auditing feature tomorrow at EuroPython. It would > be helpful to have the table available. This was not an easy

[Python-Dev] Docs: audit event table empty

2019-07-09 Thread Christian Heimes
Hi, the table with auditing events does not render on docs.python.org, https://docs.python.org/3.9/library/audit_events.html. Steve and I are going to present the auditing feature tomorrow at EuroPython. It would be helpful to have the table available. It works on Steve's and my local machine

[Python-Dev] Re: obmalloc (was Have a big machine and spare time? Here's a possible Python bug.)

2019-07-09 Thread Inada Naoki
On Tue, Jul 9, 2019 at 9:46 AM Tim Peters wrote: > > > At last, all size classes has1~3 used/cached memory blocks. > > No doubt part of it, but hard to believe it's most of it. If the loop > count above really is 10240, then there's only about 80K worth of > pointers in the final `buf`. You