The current approach is to just load a dictionary into memory from a .sobj file. I was thinking yesterday that this might be better done with a real database; I'm certainly open to that suggestion from a reviewer on the ticket. It sounds like sqlite is probably a better approach.
The load time only occurs if the number is larger than 40 bits (if smaller then trial division is used), and if it's one off from a perfect power. But I can look into fixing the load time issue. David On Sat, Dec 10, 2011 at 13:11, William Stein <[email protected]> wrote: > On Sat, Dec 10, 2011 at 11:54 AM, Jeroen Demeyer <[email protected]> > wrote: >> On 2011-12-10 18:43, William Stein wrote: >>>> After a couple seconds loading a dictionary into memory >>> >>> Is it really a *couple of second*? >> Yeah, that's a lot. I don't think that the Cremona database of elliptic >> curves for example has this overhead. > > The ZODB small one doesn't, since instead of loading a dictionary, it loads > an index into a dictionary (I think). The big Cremona database *does* take > a couple of seconds on first load, since its index is really big (I > think). Fortunately, > Andrew Ohana rewrote it recently to instead use sqlite, and now it also loads > instantly. > > I would very much *not* like it if the first time I run factor it > always pauses for a few seconds > to load a file. A way around that, might be to only load the file if > the number to factor is at least 60 digits (say). Maybe the patch > already does that? I didn't look. > > -- william > > -- > 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 -- 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
