Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #8682 > unrolled thread
| Started by | Tomas Garza <tgarza10@msn.com> |
|---|---|
| First post | 2012-02-22 10:31 +0000 |
| Last post | 2012-02-22 10:31 +0000 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.soft-sys.math.mathematica
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: How I can I optimize the following code in order to Tomas Garza <tgarza10@msn.com> - 2012-02-22 10:31 +0000
| From | Tomas Garza <tgarza10@msn.com> |
|---|---|
| Date | 2012-02-22 10:31 +0000 |
| Subject | Re: How I can I optimize the following code in order to |
| Message-ID | <ji2g6e$k9d$1@smc.vnet.net> |
Is this really supposed to do anything, other than calculating 9,000,000 times the same thing, i.e.,
Sin (45.0)*ArcSin (0.5)*Sqrt (5.0)*ArcTan (2.5555), a task which takes 46 seconds in my PC (using the right syntax)? To obtain x in a very short time you just have to calculate it only once...
-Tomas
> Date: Tue, 21 Feb 2012 06:09:34 -0500
> From: gearss8888@gmail.com
> Subject: How I can I optimize the following code in order to get very short running time
> To: mathgroup@smc.vnet.net
>
> How I can I optimize the following code in order to get very short
> running time?
>
> Time1 = AbsoluteTime[];
> n = 3000;
> Do[Do[x =
> Sin (45.0)*ArcSin (0.5)*Sqrt (5.0)*ArcTan (2.5555);, {n}], {n}];
> Time2 = AbsoluteTime[];
> Print[Time2 - Time1];
>
Back to top | Article view | comp.soft-sys.math.mathematica
csiph-web