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


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

Re: Replace, ReplaceAll and If time performace comparition

From awnl <awnl@gmx-topmail.de>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: Replace, ReplaceAll and If time performace comparition
Date 2012-06-30 09:16 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <jsmg60$1ij$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> <jsjq44$ct6$1@smc.vnet.net>

Show all headers | View raw


Hi,


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

It looks like yes. What you should have in mind is that Compile does 
transform Mathematica code to something else (with CompilationTarget -> 
"C" to C). The speedup depends a lot on how well optimized the generated 
code is. I think the general rule is that constructs which are less 
general and easier to analyze will be easier to optimize and thus have a 
greater chance to be translated to something efficient.

As we don't know which transformation rules the code generator uses, it 
will always need some experimenting, though.

hth,

albert

Back to comp.soft-sys.math.mathematica | Previous | Next — Previous 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