MathGroup Archive 2012

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: V8 slow like a snail

  • To: mathgroup at
  • Subject: [mg127704] Re: V8 slow like a snail
  • From: Roland Franzius <roland.franzius at>
  • Date: Wed, 15 Aug 2012 05:27:33 -0400 (EDT)
  • Delivered-to:
  • Delivered-to:
  • Delivered-to:
  • Delivered-to:
  • References: <k0fjaj$q71$>

Am 15.08.2012 09:32, schrieb Dr. Wolfgang Hintze:
> Great disappointment on my side with Home edition which I
> installed yesterday!
> My first impression: looks good, many nice features ... but incredibly
> slow in comparision to my good old 5.2.
> I then carried out a modest benchmark test the results of which I'll
> show below and which I like to express in terms of a "snail
> factor" ( = time in v5.2/ time in v8).
> Consider this integral for which we can safely expect Mathematica to
> be expert in solving:
> f1[n_, m_] :=
>   Integrate[n t^m Exp[-n t] (Exp[t] - 1)^(n - 1), {t, 0, \[Infinity]},
>    Assumptions -> {{n, m} \[Element] Integers, m >= 0, n > 0}]
> I carried out Timing[f1[n, m]] for m=0,1,2,3,10 in both versions. Here
> are the results in the format
> {m, V5.2 f1 first call, V5.2 second call, V8 first call, V8 second
> call, snail factor first call, snail factor second call}
> {
> { 0, 0.328, 0.078, 2.122, 2.044, 6.46951, 26.2051},
> { 1, 0.109,  0.063, 30.202, 30.483, 277.083, 483.857},
> { 2, 0.421, 0.11,  30.42, 30.17, 72.2565, 274.273},
> { 3, 0.452, 0.156, 31.528, 31.325, 69.7522, 200.801},
> {10, 5.366, 5.382, 42.448, 42.682, 7.91055, 7.93051}
> }
> Even if we compare only the first calls the range of the snail factor
> goes up to 277 at m = 1, is 72 for m = 2, and is still close to 8 for
> larger m.
> This is my story in other words: I own a very old car, and have
> considered for a long time to change to a newer one - although it
> still can go at 200 km/h on the Autobahn.
> So now I am proud owner of the new brilliant car, and I must learn the
> on important tours (m=1) =EDts maximum speed turns out to be less than 1
> km/h,  about 3 km/h (m=2) or at most about 30 km/h. Who laughes? Me
> not! Obviously I'll definitely keep the old car!
> Ok, maybe I have chosen the wrong example (though in other test runs a
> similar pictures emerged and this example is just the type I'm using
> Mathematica for). Are there perhaps acknowleged benchmarks for such a
> comparison of versions?
> Finally, dear group, as you might have noticed, I'm asking for
> consolation. Please comment and give me useful hints. Many thanks in
> advance.

It is a good idea, to split seaching solutions and simplifying the 
solutions. In this very special case the indefinite integrals produce 
series of hypergeometric functions of n terms in 1/10 of a second.

And now vs 8 Simplifies this rather trival result for the definite case 
on {t,0,oo} into sums of polygammas.

Of course, nobody can foresee the results of additional simplification 
rules in case of special algebraic expressions. This happens with each 
new version. More simplification rules, more time.

My hope is that Wolfram at some point may give much more open control 
over implicit function simplification to his mathematical skilled users.

  This is already a problem in trigonometric simpilfications. A simple 
body of explicit rules choosen from the appropriate chapters of a 
standard formula website would be much more usable than the obscure 
dependency on an universal body of rules and an algorithm depending on 
time and leafcount. I completely stopped using Sin&Co and I am now 
writing all formulas in sin and cos and 1/sin  and feed the 
simplification rules by hand. Saves hours of computation time.

The same is true for the superflous work that has to be done in order to 
get an expression grouped in a conventional way readable for Mathematica 


Roland Franzius

  • Prev by Date: Re: V8 slow like a snail
  • Next by Date: Re: Problem finding maximum
  • Previous by thread: Re: V8 slow like a snail
  • Next by thread: Re: V8 slow like a snail