MathGroup Archive 2005

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

Search the Archive

Re: vectorization

  • To: mathgroup at smc.vnet.net
  • Subject: [mg61460] Re: vectorization
  • From: Janusz Kawczak <jkawczak at uncc.edu>
  • Date: Wed, 19 Oct 2005 02:17:20 -0400 (EDT)
  • References: <dipr0s$he5$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Tim,

below is the Timing for my system using all the functions from the web
indicated in your e-mail. It is not giving a whooping 12 times or higher
factor but mere 2 times or less. I also would like to see an example
to support of 17 times faster for Cosh computations.

Best, Janusz.

In[1]:=
\!\($Version\[IndentingNewLine]
   \(z := Table[Random[], {i, 1, 10\^7}];\)\[IndentingNewLine]
   Timing[Cosh[z]; ]\[IndentingNewLine]
   Timing[ArcSinh[z]; ]\[IndentingNewLine]
   Timing[Sinh[z]; ]\[IndentingNewLine]
   Timing[Tanh[z]; ]\[IndentingNewLine]
   Timing[Exp[z]; ]\[IndentingNewLine]
   Timing[Tan[z]; ]\[IndentingNewLine]
   Timing[ArcTan[z]; ]\[IndentingNewLine]
   Timing[Sin[z]; ]\[IndentingNewLine]
   Timing[Cos[z]; ]\)
Out[1]=
5.2 for Microsoft Windows (June 20, 2005)
Out[3]=
{2.031 Second, Null}
Out[4]=
{2.234 Second, Null}
Out[5]=
{2.157 Second, Null}
Out[6]=
{2.062 Second, Null}
Out[7]=
{1.922 Second, Null}
Out[8]=
{2.063 Second, Null}
Out[9]=
{2.062 Second, Null}
Out[10]=
{1.984 Second, Null}
Out[11]=
{1.954 Second, Null}


In[1]:=
\!\($Version\[IndentingNewLine]
   \(z := Table[Random[], {i, 1, 10\^7}];\)\[IndentingNewLine]
   Timing[\(Cosh[z];\)]\[IndentingNewLine]
   Timing[\(ArcSinh[z];\)]\[IndentingNewLine]
   Timing[\(Sinh[z];\)]\[IndentingNewLine]
   Timing[\(Tanh[z];\)]\[IndentingNewLine]
   Timing[\(Exp[z];\)]\[IndentingNewLine]
   Timing[\(Tan[z];\)]\[IndentingNewLine]
   Timing[\(ArcTan[z];\)]\[IndentingNewLine]
   Timing[\(Sin[z];\)]\[IndentingNewLine]
   Timing[\(Cos[z];\)]\)
Out[1]=
5.1 for Microsoft Windows (October 25, 2004)
Out[3]=
{4.516 Second, Null}
Out[4]=
{3.89 Second, Null}
Out[5]=
{4.531 Second, Null}
Out[6]=
{4.422 Second, Null}
Out[7]=
{3.453 Second, Null}
Out[8]=
{3.219 Second, Null}
Out[9]=
{2.516 Second, Null}
Out[10]=
{2.625 Second, Null}
Out[11]=
{2.562 Second, Null}

tim wrote:

> Dear mathgroup!
>      I have a question on a new feature of mathematica 5.2. Question 
> about Vectorization:
> http://www.wolfram.com/products/mathematica/newin52/vectorization.html
> Can you show me concrete example code that demonstrates comparation of 
> rates between of  5.1 and 5.2 versions?
> I test different functions Exp, Sin, e.t.s. but I have the same rate of 
> calculation for both Matematica 5.1 and 5.2. I use an intel Pentium 4 
> computer. Thank you!
>     Tim,
>         Moscow, MEPhI, Plasma physics department
> 


  • Prev by Date: Re: Function, Command, Operator, Object...etc.
  • Next by Date: Re: TagSet and the listability of Plus[ ]
  • Previous by thread: vectorization
  • Next by thread: Mathematica randomly stopping in M5.2 for Solaris