Hi Martin,

On 27 Apr., 17:06, Martin Raum <[email protected]>
wrote:
> I still don't have a strong oppinion on this. This is mainly because I
> would like to see one additional test: Could you compare (timewise)
> the creation of say 1 or 10 million (easy) objects based on a version
> with and without patch?

By "objects", I suppose you mean instances of
sage.structure.element.Element, such as elements  of a finite field?
You say "timewise", so, I suppose that I should just create the
elements, not keep them in memory, and some of them may coincide? I
hope the test below is OK for you.

With sage-4.7.alpha5, I obtain:

sage: K = GF(101)
sage: get_memory_usage()
839.96484375
sage: %time for i in xrange(10^7): a = K(i)
CPU times: user 25.19 s, sys: 0.01 s, total: 25.21 s
Wall time: 25.20 s
sage: get_memory_usage()
839.96484375

sage -startuptime yields
...
== Slowest (including children) ==
1.128 sage.all (None)
0.275 sage.schemes.all (sage.all)
0.197 sage.misc.all (sage.all)
...


With sage-4.7.alpha5 and the patches from #9976 (that's about
introspection and is a dependency) and #11115 (that's the
cached_method stuff), I get
sage: K = GF(101)
sage: get_memory_usage()
841.96875
# show that the new attribute is there, but it is non-initialized
sage: a=K(4)
sage: print a.__cached_methods
None
sage: %time for i in xrange(10^7): a = K(i)
CPU times: user 24.46 s, sys: 0.00 s, total: 24.46 s
Wall time: 24.46 s
sage: get_memory_usage()
841.96875

sage -startuptime yields
...
== Slowest (including children) ==
1.137 sage.all (None)
0.274 sage.schemes.all (sage.all)
0.178 twisted.persisted.styles (sage.all)
0.162 sage.misc.all (sage.all)
...

Conclusion:

The time for the element creation test is actually slightly better
with the patch. The startuptime did not change significantly. However,
the memory consumption did increase.

More test scenarios are welcome!

Cheers,
Simon

-- 
To post to this group, send an email to [email protected]
To unsubscribe from this group, send an email to 
[email protected]
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to