|
From: Bill H. <goo...@go...> - 2008-08-18 10:10:46
|
Hi Richard, You could just obtain some timings in both and compare. If you wanted to do a more comprehensive timing then in the magma-profiles directory of the source tree are some example profiles and a template which you can modify. Basically you'll see in the examples that in one part of the code the entire thing is timed, e.g. suppose we are timing multiplication of polynomials, we'd time the entire thing, including multiplying the polynomials, random generation of the polynomials and setting them up. In the second part, we time just generating the random polynomials and setting them up. The latter time is subtracted from the former, leaving the time it took to multiply the polynomials. This is done for a range of different values and output to a file. For example to run the polynomial multiplication example, you have to type: magma -b poly-mult.m > magma.prof & To time FLINT is slightly trickier, but not much. You have to add a file called zmod_poly-profile.c, which you can get by modifying fmpz_poly-profile.c say. That file contains numerous examples and you should throw all of them away except one, which you can use as a template for ideas. Replace the randpoly function with one that generates random zmod_poly's with a modulus with a given number of bits and of a given length. You can probably throw away the run_triangle function. I'd replace it with a run_rectangle function which just runs from bits = 2 .. 63 and length from 1 .. 250 (there isn't much point going beyond 250 since we don't have asymptotically fast GCD yet). Keep for example one specific example, e.g. the functions: sample_fmpz_poly_mul_KS, profDriverString_fmpz_poly_mul_KS, profDriverDefaultParams_fmpz_poly_mul_KS, profDriver_fmpz_poly_mul_KS. Obviously you'll have to modify each, including all the names and text strings and constants so it does what you want and times you zmod_poly_factor function (which is the equivalent of what Magma does). You'll have to add some stuff to the makefile so it builds zmod_poly-profile.o and zmod_poly-profile. Finally to run the profile do: ./zmod_poly-profile -t 1 > flint.prof & You can of course see the last few lines of the profile files being generated using tail flint.prof or tail magma.prof. Once they are done, it is actually possible to create a colour graph in an automated way to compare the two. I'll describe how to do that once you are up to that stage. Most importantly, please retain all profiling code. It is very important when publicly comparing FLINT and Magma that people can see the precise profiling code used. This is very important for fairness and so others can check it. Bill. 2008/8/18 Richard Howell-Peak <ric...@gm...>: > I was wondering how best to do the time comparisons with magma for the > factorisation algorithm. Is there an interface in flint for calling magma > functions, or shall I get some timings in magma, then do some timings in > flint and compare them like that? > > -- > Richard > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great > prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > flint-devel mailing list > fli...@li... > https://lists.sourceforge.net/lists/listinfo/flint-devel > > |