On Thursday 15 May 2008, Bill Hart wrote: > Hi Martin, > > The cycle counter in your bench code seems to give random values on > the 2.4GHz Opteron with SUSE 9 linux that I have access to, which has > Magma 2-14.10 on it. > > Anyhow, here are the Magma times: > > A := RandomMatrix(GF(2),10^4,10^4); > > B := RandomMatrix(GF(2),10^4,10^4); > > t := Cputime(); C := A*B; Cputime(t); > > 2.940 > > > A := RandomMatrix(GF(2),2*10^4,2*10^4); > > B := RandomMatrix(GF(2),2*10^4,2*10^4); > > t := Cputime(); C := A*B; Cputime(t); > > 16.570 > > > A := RandomMatrix(GF(2),2^14,2^14); > > B := RandomMatrix(GF(2),2^14,2^14); > > t := Cputime(); C := A*B; Cputime(t); > > 9.250 > > The corresponding times for your code are approximately (hand timed; > adjusted for generation of random matrices): > > 10^4: 8s > 2*10^4: 59s > 2^14: 43s > > I think it is polynomials over GF2 which Magma 2-14.x is much faster > at rather than linear algebra. > > Bill.
Hi Bill, I cannot explain the random behaviour of the cpucycles counter. The cpucycles library is by Dan Bernstein so I'd suspect it is carefully coded. Some potential sources of variance are: dynticks (i.e. the kernel doesn't have a fixed tick rate, this is done to safe power), CPU frequency scaling and other applications. On the other hand, I'd suspect I don't need to tell you since you probably benchmarked more code than I did. To account for the variance I have the small run_bench.py script in the testsuite directory. Run it like this: ./run_bench.py -t mul -n 10000 -c 3200 It'll run the experiment 17 times (17 for no particular reason) and return the median runtime. -n is the size and -c the cutoff. Cheers, Martin -- name: Martin Albrecht _pgp: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x8EF0DC99 _www: http://www.informatik.uni-bremen.de/~malb _jab: [EMAIL PROTECTED] --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---