Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #10678

Re: Replace, ReplaceAll and If time performace comparition

From Christoph Lhotka <christoph.lhotka@fundp.ac.be>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: Replace, ReplaceAll and If time performace comparition
Date 2012-06-29 08:48 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <jsjq44$ct6$1@smc.vnet.net> (permalink)
References <201206240826.EAA08423@smc.vnet.net> <201206250801.EAA15438@smc.vnet.net> <jseetb$i34$1@smc.vnet.net> <201206280802.EAA29098@smc.vnet.net>

Show all headers | View raw


Hi,

  congratulations!

  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,

   Christoph



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
>


Back to comp.soft-sys.math.mathematica | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Re: Replace, ReplaceAll and If time performace comparition Christoph Lhotka <christoph.lhotka@fundp.ac.be> - 2012-06-27 08:06 +0000
  Re: Replace, ReplaceAll and If time performace comparition awnl <awnl@gmx-topmail.de> - 2012-06-28 08:04 +0000
  Re: Replace, ReplaceAll and If time performace comparition awnl <awnl@gmx-topmail.de> - 2012-06-28 08:00 +0000
  Re: Replace, ReplaceAll and If time performace comparition Christoph Lhotka <christoph.lhotka@fundp.ac.be> - 2012-06-29 08:48 +0000
    Re: Replace, ReplaceAll and If time performace comparition awnl <awnl@gmx-topmail.de> - 2012-06-30 09:16 +0000

csiph-web