Helloooooooo !!

> Cartesian product is a generic construction, so it should be clear that it
> is much slower than the super-optimized routines for prime finite fields.

It probably will never be as fast as those fields, but there is a waste of
time anyway.

> Do you need element-wise multiplication? If you are only interested in the
> Abelian group structure then there is AbelianGroup([2,3]). Maybe you want
> IntegerModRing(6).

Most of the code in sage.combinat.designs.database does.

For instance :

sage: %time _=designs.orthogonal_array(16,208)
CPU times: user 6.82 s, sys: 64 ms, total: 6.88 s
Wall time: 6.79 s
sage: %prun -s cumulative _=designs.orthogonal_array(16,208)
   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
        1    0.008    0.008   11.477   11.477 <string>:1(<module>)
        1    0.000    0.000   11.469   11.469
orthogonal_arrays.py:617(orthogonal_array)
        1    0.000    0.000   11.455   11.455 database.py:2602(OA_16_208)
        1    0.008    0.008   11.454   11.454
database.py:3266(_helper_function_when_n_is_prime_times_power_of_2)
        1    1.068    1.068   11.268   11.268
orthogonal_arrays.py:1181(OA_from_quasi_difference_matrix)
   656760    0.512    0.000   10.246    0.000
additive_magmas.py:392(__add__)
   656760    1.181    0.000    8.105    0.000 additive_magmas.py:500(_add_)
  1313520    2.468    0.000    4.880    0.000
sets_cat.py:1944(cartesian_factors)
   659880    1.219    0.000    1.765    0.000
cartesian_product.py:179(_cartesian_product_of_elements)
   656760    1.512    0.000    1.512    0.000
{sage.structure.sage_object.have_same_parent}
  3940560    1.051    0.000    1.441    0.000 sets_cat.py:1965(<genexpr>)

Nathann

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to