| Author |
Comment/Response |
yehuda
|
11/11/12 02:57am
This is not a real question, but maybe a clarification would help
ReplaceAll works on the expression. Expressions in Mathematica can be represented as trees so to scan a tree and replace subparts, DFS is used. This, plus the fact that you do not define types, is more time consuming that using assumptions about variable types in Compile
There is no other way (beside searching, you can define BFS yourself, but this would be much slower)
If you need to do that operation many times on large expressions, Compile is worth the effort of additional programming, otherwise the common sense is just to use ReplaceAll
yehdua
URL: , |
|