[issue41732] Custom iterator to memoryview - performance improvement

2020-09-08 Thread Diogo Flores
Diogo Flores added the comment: Thank you Dong-hee Na and Victor. @Stefan Krah: I am sorry that you didn't had the chace to try out the patch before it got merged, however iff you are curious about the any aspect of the implementation (or the motivation behind it) I am happy to discuss

[issue41732] Custom iterator to memoryview - performance improvement

2020-09-06 Thread Diogo Flores
Change by Diogo Flores : -- keywords: +patch pull_requests: +21203 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22119 ___ Python tracker <https://bugs.python.org/issu

[issue41732] Custom iterator to memoryview - performance improvement

2020-09-06 Thread Diogo Flores
New submission from Diogo Flores : Hi, Here's a patch that adds an iterator to memoryview, which makes iterating over memoryview objs considerably faster. The following values result from a compilation with debug

[issue39959] Bug on multiprocessing.shared_memory

2020-07-27 Thread Diogo Flores
Diogo Flores added the comment: I have tried a different approach using https://gitlab.com/tenzing/shared-array and I got it to perform well on Linux. Basically, the code above places all numpy arrays in /dev/shm which allows you to access and modify them from any number of processes

[issue39959] Bug on multiprocessing.shared_memory

2020-04-17 Thread Diogo Flores
Diogo Flores added the comment: Any update on this issue? -- title: (Possible) bug on multiprocessing.shared_memory -> Bug on multiprocessing.shared_memory ___ Python tracker <https://bugs.python.org/issu

[issue39959] (Possible) bug on multiprocessing.shared_memory

2020-03-17 Thread Diogo Flores
Diogo Flores added the comment: Follow up - tested on Linux (The first solution). The solution presented below will fix the problem with the caveat that the base process (the one that creates the shared-memory obj) must outlive any process that use the shared-memory. The rationale

[issue39971] Error on documentation - Quick fix.

2020-03-16 Thread Diogo Flores
Diogo Flores added the comment: Agreed, Eric. Nevertheless, I think that this example might raise unnecessary confusion to someone new to Python, and hence the reason why I decided to open the issue. Anyhow, I trust your judgement and please feel free to leave things as is and close

[issue39971] Error on documentation - Quick fix.

2020-03-15 Thread Diogo Flores
New submission from Diogo Flores : Hello, A code example from the 'functional programming how-to' raises an error. The simplest fix would be to remove the Ellipsis object from the 'line_list'. Thank you, Diogo Please check below for the commands issued: # https://docs.python.org/3/howto

[issue39959] (Possible) bug on multiprocessing.shared_memory

2020-03-13 Thread Diogo Flores
New submission from Diogo Flores : Hello, I came across with what seems like a bug (or at least a disagreement with the current documentation). Discussion: I expected that after creating a numpy-array (on terminal 1), which is backed by shared memory, I would be able to use it in other