On Aug 23, 12:24 am, Simon King <simon.k...@nuigalway.ie> wrote: > > So, over QQ, MMA is slightly faster, but over finite fields Sage > clearly wins? That is already something worth pointing out. >
I'm not a mma expert, but since they have no system in place to define the ring it's noteworthy to stick the finger where it hurts ... Here is another very simple one: multiply and add random boolean matrices: sage: m1 = random_matrix(GF(2), 1000, 1000) sage: m2 = random_matrix(GF(2), 1000, 1000) sage: %timeit 'm1 * m2' 10000000 loops, best of 3: 31.2 ns per loop sage: %timeit 'm1 + m2' 10000000 loops, best of 3: 31.2 ns per loop In[15]:= m1 := RandomInteger[{0,1},{1000, 1000}] In[16]:= m2 := RandomInteger[{0,1},{1000, 1000}] In[17]:= Timing[Mod[m1.m2, 2]][[1]] Out[17]= 30.7219 In[18]:= Timing[Mod[m1+m2, 2]][[1]] Out[18]= 0.060003 One might argue, that mathematica isn't "designed" for this kind of calculations, but on the other hand, they call themselves "mathematica" with a touch of being an universal tool, and that's just a basic operation. I'm sure, there are plenty of mma users in the wild doing such calculations! H --~--~---------~--~----~------------~-------~--~----~ To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---