use_fast_arrays : true & batch files



Nice example--no batching required:

(%i1) use_fast_arrays : true;
(%o1) true

(%i2) a[2*x] : 1;
(%o2) 1

(%i3) a[factor(2*x)] : 2;
(%o3) 2

(%i4) a[2*x];
(%o4) 1

(%i5) a[factor(2*x)];
(%o5) 2

(%i6) ?print([2*x, factor(2*x)]);
((MLIST SIMP) ((MTIMES SIMP) 2 $X) ((MTIMES SIMP FACTORED) 2 $X))
(%o6) [2*x,2*x]

And

(%i2) use_fast_arrays : false;
(%o2) false

(%i3) a[2*x] : 1;
(%o3) 1

(%i4) a[factor(2*x)] : 2;
(%o4) 2

(%i5) a[2*x];
(%o5) 2

(%i6) a[factor(2*x)];
(%o6) 2

In short, hashed arrays + use_fast_arrays : true = trouble. Maybe sticking to integer
indices is OK?

When use_fast_arrays is false, I'm not sure how Maxima handles undeclared arrays, but it
involves the function hasher--the source code comment for hasher (defined in mlisp.lisp) says:

  This is not the best way to write a hasher. But, please don't change this code or you're
  liable to break SAVE files.

OK, it's not the best (and what would that mean?).

--Barton
________________________________

What happens for e.g. 2*x vs. factor(2*x)? or vs. ratsimp(2*x)? -- they are also alike1 but not equal.