Hi, I've come across a strange performance issue while implementing the Jacobi method. In the attachment, the last parameter in the "Jacobi" function, just controls how a certain sum is computed: using the Mathematica Sum (WithSum==1) or by standard partial sums. In my understanding, this should be equivalent, however I see a whole different story... For very small dimensions, say n <= 200, using Sum gives slightly smaller computational times. However, from a certain point on ( in my case n = 250), Sum suddenly starts taking forever... For n=250 using sum takes almost 40 times more then not using Sum!
How can this be??
Attachments: