1 | initial version |
Yes, you can save and restore computed objects easily. This will be faster if the time to load the object from disk is lower than the time to compute it. Certainly, an object that takes 20 minutes to compute is going to be faster to load from a saved state on disk than it is to recompute. The saved state is just a file that Sage can restore to an object in memory, so you can certainly share such saved objects with others.
Have a look at the save
and load
functions. Here's an example of their use:
sage: E = EllipticCurve([-1,0])
sage: save(E, 'elliptic')
sage: quit
....
>sage
sage: E = load('elliptic.sobj')
sage: E
Elliptic Curve defined by y^2 = x^3 - x over Rational Field
If you are working in the Sage notebook, saved object files will be stores in the DATA
directory. If you want to share the object with someone else, I think you need to download the worksheet from the server and send that (it will contain the saved object file).