Re: MMA 5.1 Integrals
- To: mathgroup at smc.vnet.net
- Subject: [mg52838] Re: MMA 5.1 Integrals
- From: Urijah Kaplan <uak at sas.upenn.edu>
- Date: Tue, 14 Dec 2004 05:59:41 -0500 (EST)
- Organization: University of Pennsylvania
- References: <cpauqc$ipm$1@smc.vnet.net> <cpjnj9$n7r$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
nospam nospam wrote: > Egbert Kankeleit wrote: > > >>Someone with elitist "insight" can understand the philosophy >>of costly updates? : >> >>Example (win2000, 850 MHz): >> >>i) Timing[ FourierTransform[Exp[-(x + 1)^2] , x, X];] >> >>ii) Timing[ Integrate[Exp[-(x + 1)^2 + I *x *X], >> {x, -\[Infinity],\[Infinity]}];] >> >>iii) Timing[ LaplaceTransform[Exp[-(x + 1)^2], x, X];] >> >>results respectively: >> MMA 4.2, MMA 5.0 MMA5.1 >> >>i) 1.4 Infinity 117. seconds >>ii) 1.0 45. 1.9 >>iii) 0.15 1.0 1.0 >> >>WRI, quo vadis? >> >>kankel >> >> > > > > You must have very old PC or something? > I am running XP, and I tried the third test, and I get (my > PC is almost 3 years old), this is Mathematica 5.1 > > d = Table[Timing[LaplaceTransform[Exp[-(x + 1)^2], x, X]][[1, 1]] > , {i, 100}]; > > Mean[d] > 0.10094 > > Min[d] > 0.078 > > Max[d] > 0.11 > > so I get something faster than 4.2 > > You have to understand that the FIRST time you run the > command, it can take as much as 10 times longer, since > it will load the code to memory when needed. so get > an accourate test, try the command once, then the > second time will be the actual timing results you want to > look at. > > I found Mathematica to be very fast actually. > > > > > I don't think that's what's is going on. I believe Mathematica is caching some of the intermediate results, so Mathematica is not actually completely recalculating the result. In order to prevent that, you should use ClearCache[]. On an Athlon XP 1700+ and Mathematica 5.1; d = Table[Developer`ClearCache[]; Timing[LaplaceTransform[Exp[-(x + 1)^2], x, X]][[ 1,1]], {i, 100}]; {Mean[d], Min[d], Max[d]} {0.47169,0.437,0.547} --Urijah Kaplan