Ilya Zakharevich on Sun, 28 May 2006 00:18:56 +0200

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: 2.2.10 four times slower than 2.2.8

On Sat, May 27, 2006 at 04:38:06PM +0200, Karim Belabas wrote:
> 2) whenever intnum is used intensively using intnuminit() often helps.

I do not understand why intnuminit(0,1) could be ever needed.  Could
not the tables for simple (=non-parametric) end types be memorized
when first calculated, like bernuilli numbers?

Or do they change as time goes?

Cannot say that documentation of intnum() is very helpful.  Should not
one put a sentence like

  tab may be 0 (default), a number m, or a table of ...

in beginning (if it is correct)?  Otherwise m is used without
indicating what it is.  And something like

  m used in the calculation may be found by calling intnumstep() after
  the calculation.  Before the first call to intnum() or friends, m
  returns ???

BTW, it is not clear whether intnum() tries to increase m during the
calculation (if tab=0).  Does it?  If it does, should not a
multidimensional integral over rectangles be implemented internally,
so that the old values may be reused (if possible)?  (This would not
help the integration in my example, since it is over a
high-dimensional simplex.)

> P.S: The following script implements Marsaglia's method, as described in Bach
> and Peralta ( Math Comp. 65 (216), 1996, 1701-1715 ) and is orders of
> magnitude faster than direct numerical integration
>   rho(u) =
>   { local(n, N, C0, C);

Thanks, I will try it.