New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Proper implementation of object pools #17670
Comments
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Commit: |
comment:6
I've just had a look at your implementation (sorry for the delay). I saw that you stored the address of the pool in a dictionary. Did you try to estimate the time penalty of this dictionary lookup? For instance, did you compare timings between (1) your implementation and (2) the current implementation for integers? By design, your implementation cannot allow what I've called local pools (several different pools are possible for a same type) and global pools (a unique pool is shared all by all elements having a given type). I'm a bit sad about this because I think that having different pools may really make sense (for instance for p-adics when we are dealing with many different primes p and then objects with different sizes). Why are you limiting the number of pools to 4? Isn't it too small? New commits:
|
comment:7
Replying to @xcaruso:
4 per Cython module. |
comment:8
A more general comment about pools is that everybody has a different set of features. For example, the |
Dependencies: #24111 |
comment:10
Let me continue with this... I'm adding a dependency on #24111 because that makes it a lot easier to write modules which are partially implemented in C and partially in Cython. |
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
|
comment:13
Replying to @xcaruso:
I am not doing any dictionary lookup (except for putting the pool in the dict). I am storing the pool in the dict for 2 reasons: for debugging purposes and to ensure that some reference is kept to the pool (to prevent it from being deleted). I do not use this dict in the implementation.
I never understood the need for local pools. I thought that you stored the pool in the parent only for practical purposes.
What do you mean with "objects with different sizes"? |
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
|
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
|
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
|
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
|
comment:22
There is worrying doctest failure on the patchbot that I'll need to check. |
Changed branch from u/jdemeyer/proper_implementation_of_object_pools to u/caruso/proper_implementation_of_object_pools |
comment:25
I do intend to come back to this ticket, but this really needs a new version of Cython. Last 10 new commits:
|
Changed branch from u/caruso/proper_implementation_of_object_pools to u/jdemeyer/proper_implementation_of_object_pools |
Changed branch from u/jdemeyer/proper_implementation_of_object_pools to u/caruso/proper_implementation_of_object_pools |
comment:28
??? New commits:
|
comment:29
Sorry, I merged by mistake ticket #23505 into this one. |
comment:30
So the branch should be reset to my branch then? |
comment:31
Well, I also resolved a couple of conflicts, so that my branch is supposed to merge properly with develop. |
comment:32
I see. But given that #24111 is not a "real" ticket, it's better to rebase instead of merge. |
comment:33
#24111 just became a real ticket and it needs review :-) |
Changed keywords from none to padicIMA |
comment:35
Xavier, Julian and I are going to be working on p-adics this coming week in Bordeaux. I'm just tagging this ticket as one we might want to look at. |
Changed keywords from padicIMA to padicIMA, padicBordeaux |
comment:36
Jeroen, we're happy to work on this a bit this week (in particular, resolving merge conflicts). Do you have any known issues with what you've written? |
Changed branch from u/caruso/proper_implementation_of_object_pools to u/roed/proper_implementation_of_object_pools |
comment:38
I resolved the merge conflicts, which were in the cython version level and New commits:
|
integer.pyx
andreal_double.pyx
usehook_tp_functions()
to changetp_new
andtp_dealloc
at run-time. It seems that one cannot avoid such hacks with the current Cython, but at least we could provide a cleaner interface.Depends on #24111
CC: @roed314 @saraedum @xcaruso
Component: cython
Keywords: padicIMA, padicBordeaux
Author: Jeroen Demeyer
Branch/Commit: u/roed/proper_implementation_of_object_pools @
d7d56b1
Issue created by migration from https://trac.sagemath.org/ticket/17670
The text was updated successfully, but these errors were encountered: