On Wed, Sep 28, 2022 at 11:22:25AM -0700, Sid Andal wrote: > The attached file worked (I rearranged the u_ij and v_ij assignments to > reproduce the mult-table of the basis-vecs). > To reduce the number of I/O calls I made the following changes: > > TwoDim.input: > > fn := filename("", "Data", "input")$FileName > p := nextPrime 13000 > R := PrimeField p > LR ==> List R > > f := open(fn, "input")$File(LR) > > [u11, v11] := read!(f) > [u12, v12] := read!(f) > > [u21, v21] := read!(f) > [u22, v22] := read!(f) > > close!(f) > . > . > . > The rest is the same as before. > > > The data file now has lines enclosed in parenthesis: > > > Data.input: > > (7189 8903) > (2669 79) > > (10933 9262) > (5060 11572) > EOF > > To further reduce the I/O overhead, is it possible to read the entire > Data.input at once and then parse for the entries, (in general, it may have > thousands entries)?
Have you measured time taken by I/O? I would say do not bother with optimization unless measurement indicate that it matters. > The 2nd question is not a really big deal....just curious, though: > The vector components on screen always appear in reverse order instead of > their natural order set by the ordered basis. Can this be changed? ATM no. More precisely order is "hardcoded" in the domain, one can modify printing function to get different order. Such modification is reasonably easy for FriCAS user. -- Waldek Hebisch -- You received this message because you are subscribed to the Google Groups "FriCAS - computer algebra system" group. To unsubscribe from this group and stop receiving emails from it, send an email to fricas-devel+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/fricas-devel/20220930160930.GA3476%40fricas.math.uni.wroc.pl.