olexandr-konovalov / LocalNRconstruction

Construction of local near-rings
0 stars 0 forks source link

Repeated Union(V7[w],cc) calculation #11

Open olexandr-konovalov opened 4 years ago

olexandr-konovalov commented 4 years ago

While thinking of parallelising this (@raemarina @IrynaRaievska more tomorrow), noticed that the same Union(V7[w],cc) is calculated here repeatedly three times:

https://github.com/alex-konovalov/LocalNRconstruction/blob/e296402055a55b0a8b39b383867fadc491d0f1c0/Test125/End125_comb_new.g#L60-L62

One should only compute it once after Size(cc)=r1 check. It calculates a Union of a semigroup with a list of endomorphisms, which may be expensive.

OTOH, if the semigroup is given by a generating set, which is smaller than its order, we could use SubsemigroupNC(Em,Union(GeneratorsOfSemigroup(V7[w]),cc)) there (and still reuse the result of Union(V7[w],cc) when adding it to Y[j].