Re: Speed improvements in Mathematica 5 ??
- To: mathgroup at smc.vnet.net
- Subject: [mg42529] Re: Speed improvements in Mathematica 5 ??
- From: nmk at math.princeton.edu (NIcholas M. Katz)
- Date: Sat, 12 Jul 2003 20:53:08 -0400 (EDT)
- References: <be5u0e$jg1$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Axel Kowald <kowald at molgen.mpg.de> wrote in message news:<be5u0e$jg1$1 at smc.vnet.net>... > Hello everybody, > > I just downloaded the demoversion of Mathematica 5 and tried to find the > advertised speed improvements. I got a benchmark notebook from > http://smc.vnet.net/timings40.html and run it on my old Mathematica 4.1 and the > new Mathematica 5 on the same machine (1.8GHz, win2k, 768MB RAM). > > To my surprise Mathematica 5 was only 1.6% better than the 4.1 version !! > > Any comments ? > > > Axel Kowald Here is my contribution to this discussion, in quite a negative direction! initial fooling around showed that the "finite fields" part had gotten much faster in 5.0 versus 4.2. but further fooling around shows that pretty straightforward floating point calculations have gotten FOUR TIMES SLOWER. Here is a typical example. the program computes a list of the non-trivial n'th roots of unity, and computes the sum of their b'th powers, for each b from 2 to n-1. it then adds one to each sum, and finds the max abs value. correct answer is zero. in 4.2, doing n=1601 took about 1.5 seconds, doing n=3301 about 6.5 seconds (both on my home dual processor 1 gig g4: on my 800 mhz g4 titanium, the times were 1.9 and 8.4 seconds for these tasks). these run FOUR TIMES SLOWER under mathematica 5.0 on the SAME MACHINES. Here is the session log from my g4 home dual processor machine: (nmk :g4-desktop.local. :nmk)(1)> math4.2 Mathematica 4.2 for Mac OS X Copyright 1988-2002 Wolfram Research, Inc. -- Terminal graphics initialized -- In[1]:= seventhtester[n_] := Do[x = Range[n - 1]; z = N[Cos[2*Pi*x/n]] + I*N[Sin[2*Pi*x/n]]; sums = Table[z.z^b, {b, 1, n - 2}]; sums = 1 + sums; Print[Max[Abs[sums]]]; ] In[2]:= Timing[seventhtester[1601]] -10 1.33008 10 Out[2]= {1.44 Second, Null} In[3]:= Timing[seventhtester[3301]] -10 4.16479 10 Out[3]= {6.72 Second, Null} In[4]:= Quit (nmk :g4-desktop.local. :nmk)(2)> math5.0 Mathematica 5.0 for Mac OS X Copyright 1988-2003 Wolfram Research, Inc. -- Terminal graphics initialized -- In[1]:= seventhtester[n_] := Do[x = Range[n - 1]; z = N[Cos[2*Pi*x/n]] + I*N[Sin[2*Pi*x/n]]; sums = Table[z.z^b, {b, 1, n - 2}]; sums = 1 + sums; Print[Max[Abs[sums]]]; ] In[2]:= Timing[seventhtester[1601]] -10 1.30121 10 Out[2]= {6.57 Second, Null} In[3]:= Timing[seventhtester[3301]] -10 4.16012 10 Out[3]= {30.91 Second, Null} In[4]:= Quit ************************** If anyone has any comments or ideas, I am all ears. Nick Katz