Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #10922
| From | Andrzej Kozlowski <akozlowski@gmail.com> |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | Re: Algorithm Analysis Course: Should I use Mathematica for projects? |
| Date | 2012-07-14 05:32 +0000 |
| Message-ID | <jtr09p$be6$1@smc.vnet.net> (permalink) |
| References | <15963298.38946.1342045629048.JavaMail.root@m06> <jtm3kl$gdm$1@smc.vnet.net> <20120713065522.63B32686F@smc.vnet.net> |
| Organization | Time-Warner Telecom |
On 13 Jul 2012, at 08:55, Richard Fateman wrote:
> On 7/12/2012 1:59 AM, djmpark wrote:
>> I'm not an expert at computer science so others may have something better to
>> say there.
>>
>> But I think your "Pros" argument is correct. Mathematica is broad enough and
>> deep enough that it is worthwhile getting good at it and it takes time.
>>
>> Are you aware of the book "Computer Science with Mathematica" by Roman E.
>> Maeder. It was published in 2000 for Version 4, but is still probably plenty
>> useful.
>>
>>
>
> An example.
>
> Create 3 arrays.
>
> A=Table[i,{i,0,100}];
> B=Table[i,{i,0,1000}];
> Q=Table[i,{i,0,10000}];
>
> Try updating the 50th element of each of these items, which look like
> arrays in Mathematica.
>
> Timing [A[[50]],{i,0,100000}]
>
> Timing [B[[50]],{i,0,100000}]
>
> Timing [Q[[50]],{i,0,100000}]
>
> On my computer, these results take
> 0.266 seconds, 0.453 seconds, and 2.25 seconds,
This must be a very remarkable computer indeed since on my computer I get:
In[1]:= A = Table[i, {i, 0, 100}];
B = Table[i, {i, 0, 1000}];
Q = Table[i, {i, 0, 10000}];
In[4]:= Timing[A[[50]], {i, 0, 100000}]
During evaluation of In[4]:= Timing::argx: Timing called with 2 arguments; 1 argument is expected. >>
Out[4]= Timing[A[[50]],{i,0,100000}]
I have to admit I am quite curious how this is going to turn out to be really Wolfram's fault.
Andrzej Kozlowski
Back to comp.soft-sys.math.mathematica | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: Algorithm Analysis Course: Should I use Mathematica for projects? "djmpark" <djmpark@comcast.net> - 2012-07-12 08:59 +0000 Re: Algorithm Analysis Course: Should I use Mathematica for projects? Richard Fateman <fateman@cs.berkeley.edu> - 2012-07-13 06:57 +0000 Re: Algorithm Analysis Course: Should I use Mathematica for projects? Andrzej Kozlowski <akozlowski@gmail.com> - 2012-07-14 05:32 +0000 Re: Algorithm Analysis Course: Should I use Mathematica for projects? "djmpark" <djmpark@comcast.net> - 2012-07-14 05:34 +0000
csiph-web