Skip to main content

All Questions

Filter by
Sorted by
Tagged with
2 votes
0 answers
94 views

How to push the performance of this compiled function

I have the function optvals solving for two variables. For the given example of variables, I need the program to run atmost in a millisecond. The main part of the ...
Dotman's user avatar
  • 580
1 vote
0 answers
100 views

Faster methods for performing repeated list manipulations?

I've done my best to pore over the other posts on this site, and to the best of my ability I can't seem to find a good solution to my problem, so I apologize in advance if elements of my question are ...
Texas Red's user avatar
  • 301
5 votes
1 answer
258 views

How to avoid AppendTo when computing similarities

I need to make the calculation of the HammingDistance for strings faster. The background is that I want to be able to compare the similarity of images of a textual ...
Quit007's user avatar
  • 1,275
3 votes
2 answers
375 views

My code for solving n queens problem Compile Failed

I want to make my code for solving n-queens problem faster, but it seems that MapIndexed can't be compiled. Mathematica return CompiledFunction::cfse: Compiled ...
expression's user avatar
  • 5,692
23 votes
3 answers
4k views

Fastest way to measure Hamming distance of integers

I am looking for a fast and robust way to calculate the Hamming distance of integers. The Hamming distance of two integers is the number of matching bits in their binary representations. I expect that ...
István Zachar's user avatar