5
votes
1answer
131 views

Is there a faster way to Map an Association?

Consider mapping an existing Association in a manner such as this: ...
5
votes
2answers
84 views

ReplaceAll performance problem: packed arrays on the LHS are unpacked when the RHS is too long

The following is one of the most mysterious performance problems I encountered and came up while extending the booleval function mentioned here. I am looking for a ...
0
votes
0answers
39 views

Hashing by Equals instead of SameQ

I have some numerical code involving complex numbers representing points on a plane. Some of these are equal but not identical, ie ...
4
votes
1answer
198 views

How to speed up calculations with large number of replacement rules?

In my program I have an expression which looks like: ...
5
votes
2answers
642 views

Speeding up mathematica by subsitituting numerical values

According to this Wolfram Blog post, one can speed up Mathematica code by substituting numerical values as soon as possible. How does one substitute before the main expression is evaluated? The ...
8
votes
2answers
662 views

Mathematica rule substitution memory

First I present the specific programming question, and then I provide further background details. Given an expression in Mathematica, say f=3x+7y, there are two ...