On 2/13/12 12:41 PM, William Stein wrote:
On Mon, Feb 13, 2012 at 10:29 AM, Robert Bradshaw
<rober...@math.washington.edu> wrote:
On Mon, Feb 13, 2012 at 10:06 AM, William Stein<wst...@gmail.com> wrote:
On Mon, Feb 13, 2012 at 9:59 AM, Pierre<pierre.guil...@gmail.com> wrote:
I see. Well I *do* have hundreds of 2x2 matrices to multiply out so
i'm better off storing them as numpy matrices throughout... thanks for
your explanations though.
Pierre
You might consider using Cython and writing a custom 2x2 matrix class.
It wouldn't be difficult... so I'll write one right now and respond
with the benchmarks.
Here it is: http://480.sagenb.org/home/pub/97/
I ended up using GSL's complex matrix data type and the BLAS level 3
routine to do the multiplication. I did not add any other
convenience functions to the class, so some more will probably be
needed for your application.
I'm curious why you didn't just store the 4 complex numbers in C. I
tried it and got a much bigger speedup: 17x faster than numpy and 150x
faster than Sage. See http://sagenb.org/home/pub/4303/
Thanks,
Jason
--
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org