Hi Jeroen,
On 2018-03-12, Jeroen Demeyer wrote:
> This is just the usual Py_DECREF of Python objects, it has nothing to do
> with the cyclic garbage collector: the behaviour remains the same even
> with gc.disable().
>
> This makes me think that we might need a version of CachedRepresentation
On 2018-03-12, Simon King wrote:
> Hi Jeroen,
>
> On 2018-03-12, Jeroen Demeyer wrote:
>> This is just the usual Py_DECREF of Python objects, it has nothing to do
>> with the cyclic garbage collector: the behaviour remains the same even
>> with gc.disable().
>>
>> This makes me think that we mi
On Monday, March 12, 2018 at 9:58:39 AM UTC, Jeroen Demeyer wrote:
>
> There is some very bad behaviour related to CachedRepresentation caching
> that I'm observing on #24742 (but this is otherwise unrelated to that
> ticket):
>
> sage: timeit('MatrixSpace(ZZ,3,3)')
> 625 loops, best of 3: 11
On 2018-03-12, Nils Bruin wrote:
> Your example doesn't convince me at all that we need this change though.
> You should only consider making a change if you have a real-world example
> that would significantly benefit and if you can show that degradation in
> other normal use is minimal. A sim
Hi Dima,
On 2018-03-13, Dima Pasechnik wrote:
> On Tuesday, March 13, 2018 at 8:37:49 AM UTC, Jeroen Demeyer wrote:
>> I can imagine a small function constructing a matrix (for which it needs
>> to construct the MatrixSpace) to do some computation but not keeping
>> that matrix in memory. For e
On 2018-03-12 23:07, Nils Bruin wrote:
Your example doesn't convince me at all that we need this change though.
You should only consider making a change if you have a real-world
example that would significantly benefit and if you can show that
degradation in other normal use is minimal. A simplis
On Tuesday, March 13, 2018 at 8:37:49 AM UTC, Jeroen Demeyer wrote:
>
> On 2018-03-12 23:07, Nils Bruin wrote:
> > Your example doesn't convince me at all that we need this change though.
> > You should only consider making a change if you have a real-world
> > example that would significantly
On Tuesday, March 13, 2018 at 9:38:05 AM UTC, Dima Pasechnik wrote:
>
>
>
>> I can imagine a small function constructing a matrix (for which it needs
>> to construct the MatrixSpace) to do some computation but not keeping
>> that matrix in memory. For example, the output of that function could
On Tue, Mar 13, 2018 at 9:36 AM, Jeroen Demeyer wrote:
> On 2018-03-12 23:07, Nils Bruin wrote:
>>
>> Your example doesn't convince me at all that we need this change though.
>> You should only consider making a change if you have a real-world
>> example that would significantly benefit and if you
On Tuesday, March 13, 2018 at 11:14:41 AM UTC, Erik Bray wrote:
>
>
> Doesn't Sage allow creating mutable matrices? In a case like that you
> should mutate the object rather than go through expensive object
> creation over and over.
>
I think the scenario would be one where the discriminant of
On 2018-03-13 10:38, Dima Pasechnik wrote:
this example, assuming the matrix size is a parameter, would easily
become a memory leak
You mean with my code from #24954? My idea is to cache strongly only a
fixed finite number (currently 128) of CachedRepresentation instances.
So even if you crea
On 2018-03-13 12:00, Nils Bruin wrote:
you'd be making life harder for the memory cache of the processor.
IMHO, if you worry about that, you shouldn't be writing Python.
--
You received this message because you are subscribed to the Google Groups
"sage-devel" group.
To unsubscribe from this g
On Tue, Mar 13, 2018 at 12:43 PM, Nils Bruin wrote:
> On Tuesday, March 13, 2018 at 11:14:41 AM UTC, Erik Bray wrote:
>>
>>
>> Doesn't Sage allow creating mutable matrices? In a case like that you
>> should mutate the object rather than go through expensive object
>> creation over and over.
>
>
>
On Tue, Mar 13, 2018 at 2:02 PM, Jeroen Demeyer wrote:
> On 2018-03-13 12:00, Nils Bruin wrote:
>>
>> you'd be making life harder for the memory cache of the processor.
>
>
> IMHO, if you worry about that, you shouldn't be writing Python.
While I definitely agree with that statement 100% in princ
On Tue, Mar 13, 2018 at 1:58 PM, Jeroen Demeyer wrote:
> On 2018-03-13 10:38, Dima Pasechnik wrote:
>>
>> this example, assuming the matrix size is a parameter, would easily
>> become a memory leak
>
>
> You mean with my code from #24954? My idea is to cache strongly only a fixed
> finite number (
On 2018-03-13 14:42, Erik Bray wrote:
But it
sounds like that's more or less what Jeroen is proposing (as long as
it's not caching matrices by value?)
I'm not caching the Element (Matrix) but the Parent (MatrixSpace).
--
You received this message because you are subscribed to the Google Groups
On Tue, Mar 13, 2018 at 3:10 PM, Jeroen Demeyer wrote:
> On 2018-03-13 14:42, Erik Bray wrote:
>>
>> But it
>> sounds like that's more or less what Jeroen is proposing (as long as
>> it's not caching matrices by value?)
>
>
> I'm not caching the Element (Matrix) but the Parent (MatrixSpace).
Grea
17 matches
Mail list logo