The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Inactive » comp.soft-sys.math.mathematica

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: Replace, ReplaceAll and If time performace comparition
Replies: 13   Last Post: Jul 14, 2012 1:31 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Christoph Lhotka

Posts: 39
Registered: 2/9/12
Re: Replace, ReplaceAll and If time performace comparition
Posted: Jun 29, 2012 4:48 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply



It strikes the performance of Clip on my machine by a factor of 2
(instead of
a factor of 1.45 as published in my previous post).

Does it mean, that Compile + Map + raw functions is a good combination
to speed up codes?

Question: Can anyone explain, why RuntimeOptions->"Speed" does not
improve the performance?

Thanks for your code,


On 06/28/2012 10:02 AM, awnl wrote:
> Hi,

>> Can anyone top the result?
> contradicting to my announcement, I tried anyway and found this to be
> considerably faster on my machine:
> cf3 = Compile[{{list, _Integer, 1}},
> Map[If[# > 0, #, 0] &, list],
> CompilationTarget -> "C"
> ]
> hth,
> albert

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.