Re: [Python-ideas] Preallocated tuples and dicts for function calls

2019-03-09 Thread Martin Bammer
and not iterative calls. Regards, Martin Am Sa., 9. März 2019 um 03:23 Uhr schrieb Steven D'Aprano < st...@pearwood.info>: > On Fri, Mar 08, 2019 at 10:16:02PM +0100, Martin Bammer wrote: > > Hi, > > > > what about the idea that the interpreter preallocates and &

Re: [Python-ideas] Preallocated tuples and dicts for function calls

2019-03-09 Thread Martin Bammer
Thread safety is not a problem here because of the GIL. Am Sa., 9. März 2019 um 02:03 Uhr schrieb Greg Ewing < greg.ew...@canterbury.ac.nz>: > Martin Bammer wrote: > > > what about the idea that the interpreter preallocates and preinitializes > > the tuples and dicts

[Python-ideas] Preallocated tuples and dicts for function calls

2019-03-08 Thread Martin Bammer
Hi, what about the idea that the interpreter preallocates and preinitializes the tuples and dicts for function calls where possible when loading a module? Before calling a function then the interpreter would just need to update the items which are dynamic and then call the function. Some exa

Re: [Python-ideas] Add recordlcass to collections module

2018-09-02 Thread Martin Bammer
Hi, then intention of my first mail was to start a discussion about this topic about the pros and cons and possible alternatives. As long as it is not clear that recordclass or something like that is accepted to be implemented to the collections module I do not want to spend any effort on this

[Python-ideas] Add recordlcass to collections module

2018-09-01 Thread Martin Bammer
Hi, what about adding recordclass (https://bitbucket.org/intellimath/recordclass) to the collections module It is like namedtuple, but elements are writable and it is written in C and thus much faster. And for convenience it could be named as namedlist. Regards, Martin _

Re: [Python-ideas] Do not block threads when pickle/unpickle

2018-07-16 Thread Martin Bammer
ason to want to pause the thread to let another thread run? On Mon, Jul 16, 2018 at 1:56 PM, Martin Bammer wrote: Hi, the old and slow python implementation of pickle didn't block background thread. But the newer C-implementation blocks other threads while dump/load is running. Wouldn

Re: [Python-ideas] Do not block threads when pickle/unpickle

2018-07-16 Thread Martin Bammer
ason to want to pause the thread to let another thread run? On Mon, Jul 16, 2018 at 1:56 PM, Martin Bammer wrote: Hi, the old and slow python implementation of pickle didn't block background thread. But the newer C-implementation blocks other threads while dump/load is running. Wouldn

[Python-ideas] Do not block threads when pickle/unpickle

2018-07-16 Thread Martin Bammer
Hi, the old and slow python implementation of pickle didn't block background thread. But the newer C-implementation blocks other threads while dump/load is running. Wouldn't it be possible to allow other threads during this time? Especially could load/loads release the GIL, because Python

Re: [Python-ideas] POPT (Python Ob ject Provider Threads)

2018-06-20 Thread Martin Bammer
Of course I'm happy that Python is so much optimized. I'm only disappointed that I couldn't help to improve the speed with my idea ;-) On 2018-06-20 22:50, Guido van Rossum wrote: On Wed, Jun 20, 2018 at 1:16 PM Martin Bammer <mailto:mrb...@gmail.com>> wrote:

Re: [Python-ideas] POPT (Python Ob ject Provider Threads)

2018-06-20 Thread Martin Bammer
idea a lot. Regards, Martin On 2018-06-20 13:29, Nick Coghlan wrote: On 20 June 2018 at 00:47, Martin Bammer wrote: If this idea is well implemented I expect a big performance improvement for all Python applications. Given the free lists already maintained for several builtin types in the

Re: [Python-ideas] POPT (Python Ob ject Provider Threads) (Antoine Pitrou)

2018-06-19 Thread Martin Bammer
Am 2018-06-19 um 18:00 schrieb python-ideas-requ...@python.org: Re: POPT (Python Ob ject Provider Threads) (Antoine Pitrou) Currently it's just an idea. I didn't have the time yet to create a prototype implementation. ___ Python-ideas mailing list

[Python-ideas] POPT (Python Ob ject Provider Threads)

2018-06-19 Thread Martin Bammer
Hello, because Python is a very dynamic language the memory management is heavily used. A lot of time is used for creating (reserve memory and fill object structure with data) and destroying objects. Because of this and because of the discussions about the GIL I was wondering if there isn't a sol