Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #11447
| From | "Dr. Wolfgang Hintze" <weh@snafu.de> |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | Re: V8 slow like a snail |
| Date | 2012-08-22 07:54 +0000 |
| Message-ID | <k1238f$eq$1@smc.vnet.net> (permalink) |
| References | <k0fjaj$q71$1@smc.vnet.net> <20120820081346.EFF8367FE@smc.vnet.net> |
| Organization | Time-Warner Telecom |
On 21 Aug., 03:28, Andrzej Kozlowski <akozlow...@gmail.com> wrote:
> On 20 Aug 2012, at 10:13, David Bailey <d...@removedbailey.co.uk> wrote:
>
>
>
>
>
>
>
>
>
> > On 15/08/2012 08:32, Dr. Wolfgang Hintze wrote:
> >> Great disappointment on my side with 8.0.4.0 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.
>
> >> Best regards,
> >> Wolfgang
>
> > It is important to realise two things:
>
> > 1) The home edition is the same code as the normal version.
>
> > 2) The speed of Mathematica depends on what calculation you are
> > interested in - many things have speed-ed up since 5.2. A lot of extra analysis was added to symbolic integrals (at v6.0) to ensure that the result was always valid. This slowed down symbolic integration
> > (particularly definite integrals), but is presumably worth it. There is
> > an option to Integrate that will stop at least some of this extra CPU time: GenerateConditions->False
>
> > David Bailey
> >http://www.dbaileyconsultancy.co.uk
>
> There is a third thing one should add to this. Improvements to functions
> like Integrate that usually consist of making sure that it only uses
> methods that always lead to valid answers sometimes (used to be quite
> often in the past) as a side effect result in Integrate not being able
> to obtain answers to problems that it used to give valid answers to
> before the new checks were introduced. There are a number of ways this
> could happen. The worst case is when it turns out that Mathematica got
> the old (correct) answer by applying a transformation that is invalid in
> general and just happened to work in this particular case. Probably more
> often the transformation that was applied was valid only for a narrower
> class of cases and in the newer version this class was restricted too
> far (thus excelling the case in question). In any case, it should be
> obvious to anyone that no one is trying to make Mathematica deliberately
> slower and that examples like this are almost certainly unfortunate
> "side effects" of genuine improvements.
> It does not mean, of course, that such problems should not be fixed -
> they definitely should, but to claim that functions like Integrate have
> overall become less usable in higher version displays both ignorance of
> how such things work and lack of experience with the newer version
> (there are a vast number of integrals that version 8 can do that version
> 5 can't or where version 5 gives wrong answers).
>
> Andrzej Kozlowski
>
>
Thank you for the valuable and interesting comments to which I agree
completely, except for one point: I don't know of anybody claiming
that Integrate has become less usable in higher versions in general,
including myself. I just presented examples which surprised me.
The discussion in this group helped clarify much of the issue.
Best regards,
Wolfgang
Back to comp.soft-sys.math.mathematica | Previous | Next — Previous in thread | Find similar | Unroll thread
V8 slow like a snail "Dr. Wolfgang Hintze" <weh@snafu.de> - 2012-08-15 07:32 +0000
Re: V8 slow like a snail "Dr. Wolfgang Hintze" <weh@snafu.de> - 2012-08-15 09:42 +0000
Re: V8 slow like a snail Roland Franzius <roland.franzius@uos.de> - 2012-08-15 09:42 +0000
Re: V8 slow like a snail "Dr. Wolfgang Hintze" <weh@snafu.de> - 2012-08-16 06:06 +0000
Re: V8 slow like a snail Roland Franzius <roland.franzius@uos.de> - 2012-08-18 07:57 +0000
Re: V8 slow like a snail "Dr. Wolfgang Hintze" <weh@snafu.de> - 2012-08-21 01:39 +0000
Re: V8 slow like a snail Roland Franzius <roland.franzius@uos.de> - 2012-08-21 09:02 +0000
Re: V8 slow like a snail "Alexey Popkov" <lehin.p@gmail.com> - 2012-08-17 07:44 +0000
Re: V8 slow like a snail David Bailey <dave@removedbailey.co.uk> - 2012-08-20 08:14 +0000
Re: V8 slow like a snail Andrzej Kozlowski <akozlowski@gmail.com> - 2012-08-21 01:28 +0000
Re: V8 slow like a snail "Dr. Wolfgang Hintze" <weh@snafu.de> - 2012-08-22 07:54 +0000
csiph-web