Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2001
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2001

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

Search the Archive

Compile[]

  • To: mathgroup at smc.vnet.net
  • Subject: [mg30307] Compile[]
  • From: Brent Pedersen <bpederse at nature.berkeley.edu>
  • Date: Wed, 8 Aug 2001 01:34:01 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

about speed:
is execution generally faster on:
1) a long section of code all inside Compile brackets (no function
calls),
2) a long section of uncompiled code that calls a series of Compiled
functions
3) a long section of compiled code that calls compiled functions?

more generally, is there benefit/detriment to writing a Compiled
function
for use inside compiled code? or does the call slow it down so that one
should
just write the code directly in the main compiled program? (if
readability is not an issue)

finally, a specific problem:
i want 0^0 to equal 1. so, i use:
Unprotect[Power];
Power[_, 0] = 1.;
Power[_, 0.] = 1.;
Protect[Power];
but, it seems that a compiled function is unable to access this change
and
so uses the uncompiled version. is there any way to get around this?

thanks,
-brent



  • Prev by Date: differential equation with buondary conditions
  • Next by Date: Re: Inserting Text Lines into GraphicsArray?
  • Previous by thread: Re: differential equation with buondary conditions
  • Next by thread: Problem with FourierTransform