Hello, William. > My first thought is that it would be *awesome* to have _efficient_ > multiprecision linear algebra, etc., in Sage. > This is the sort of thing people expect from Sage, but are often > disappointed to find that we don't have.
As for the efficiency, I may say that performance of the multiple precision ALGLIB is influenced by following factors: 1. low-level assembly code for the underlying MP-arithmetics 2. algorithmic optimization of the high level code 3. OOP overhead 4. Multi-core systems support (1) - assembly coding. ALGLIB uses MPFR which in turn relies on highly optimized GMP/MPIR. Double precision ALGLIB, however, isn't optimized - it is generic C, but we are talking about multiple precision version. (2) - algorithmic optimizations: * Direct linear algebra algorithms (real or complex Cholesky/LU/ inversion/solvers) are as good as their LAPACKs counterparts. * SVD/EVD, however, use suboptimal algorithms - with 3-4 times larger FLOP counts than that of the LAPACKs. It is going to be improved, but with no definite schedule. * Other algorithms (numerical integration, interpolation, optimization) are competitive with implementations from other numerical packages. (3) - OOP overhead. Multiple precision ALGLIB makes use of OOP to implement multiple precision expressions like "x=y+z". However, it leads to excessive creation of temporaries, so I will replace OOP by something less human-readable but more efficient. It is relatively easy to do because I use automatic translation to generate MP ALGLIB, so I just have to make slight changes in the translator. (4) - Multi-core systems support. ALGLIB supports only single threaded model of computations. Multi-threading support is top-priority for me, so things are going to improve, but without definite schedule too. Summarizing all mentioned above, I can say that, in my opinion, multiple precision ALGLIB is good enough to be used on moderate-sized problems. Furthermore, in some cases (direct linear algebra on a single-core system; integration, interpolation, optimization - any number of cores) only marginal improvements are possible. One thing that I need is help with multiple precision version. It is relatively easy to implement wrapper for double precision ALGLIB, and I can do it myself. But multiple precision version needs more: a) multiple precision Python object, b) multiple precision arrays/matrices, c) smooth integration of these MP objects in the SAGE framework. I have very little experience with Python, so it is better to find experienced SAGE developer who wants to work with me on this project. I can build low level "SAGE <-> MP ALGLIB" interface, but I need someone who can help with higher level constructs and with smooth integration in the SAGE framework. P.S. BTW, may be it is time to make a new thread for this discussion - something like "multiprecision SAGE"? We've gone far from the original topic :) -- With best regards, Sergey mailto:[email protected] -- 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
