Re: Compile
- To: mathgroup at smc.vnet.net
- Subject: [mg45271] Re: Compile
- From: Bill Rowe <readnewsciv at earthlink.net>
- Date: Wed, 24 Dec 2003 17:42:31 -0500 (EST)
- Sender: owner-wri-mathgroup at wolfram.com
On 12/24/03 at 4:35 AM, dontsendhere@. (Maxim) wrote:
> Not exactly. An elementary test shows that with both settings for Compiled the first
> argument of Plot is evaluated in a non-standard way, as it should be (Mathematica Book,
> A.4.2):
> In[1]:=
> Plot[Random[], {x, 0, 1}, Compiled -> True]
> Plot[Random[], {x, 0, 1}, Compiled -> False]
> (plots an irregular curve, not a straight line for one pre-evaluated value of Random[]).
I don't see how this demonstrates your point. If you Compile an elementary (one pre-defined by Mathematica, i.e., not defined with Mathematica code) function I would expect no difference between the compiled and un-compiled versions. That is, I would expect the Mathematica interpreter to execucte some compiled code when it sees the token Random. And I would expect Compile to simply point to this compiled code.
I would expect the only cases where Compile would make a difference is when the expression to be compiled is a sequence of operations defined by Mathematica code.
--
To reply via email subtract one hundred and four