Timeline for Optimization of the following code
Current License: CC BY-SA 4.0
27 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Sep 15, 2019 at 0:39 | vote | accept | Matheus Manzatto | ||
S Sep 14, 2019 at 23:42 | history | bounty ended | Matheus Manzatto | ||
S Sep 14, 2019 at 23:42 | history | notice removed | Matheus Manzatto | ||
Sep 14, 2019 at 16:58 | answer | added | Henrik Schumacher | timeline score: 10 | |
Sep 14, 2019 at 8:04 | history | edited | Αλέξανδρος Ζεγγ | CC BY-SA 4.0 |
deleted 9 characters in body
|
Sep 14, 2019 at 6:38 | history | edited | Αλέξανδρος Ζεγγ | CC BY-SA 4.0 |
deleted 98 characters in body
|
Sep 14, 2019 at 3:34 | history | edited | Henrik Schumacher |
edited tags
|
|
Sep 13, 2019 at 3:36 | comment | added | Schopenhauer | I am looking again into reference.wolfram.com/language/tutorial/… | |
Sep 13, 2019 at 3:33 | comment | added | Schopenhauer |
Nothing specific on my end so far but my first impression is that using DistributeDefinitions and ParallelCombine could be worth looking into. Also instead of nesting If statements I would use Which or Dispatch . I am thinking that for large integer values I would look into using Mod[ m, n ] and use this difference instead of the original number. I am also thinking into Compile and in the Method->"CoarsestGrained" option for ParallelCombine . I am still looking into it. To save intermediate results Sow and Reap instead of g[x]:= g =expr_ .
|
|
Sep 12, 2019 at 9:00 | history | tweeted | twitter.com/StackMma/status/1172072463880065024 | ||
Sep 11, 2019 at 18:51 | history | edited | Matheus Manzatto | CC BY-SA 4.0 |
added 45 characters in body
|
S Sep 11, 2019 at 18:51 | history | bounty started | Matheus Manzatto | ||
S Sep 11, 2019 at 18:51 | history | notice added | Matheus Manzatto | Canonical answer required | |
Sep 10, 2019 at 0:03 | history | edited | Matheus Manzatto |
edited tags
|
|
Sep 9, 2019 at 23:20 | history | edited | Matheus Manzatto | CC BY-SA 4.0 |
added 14 characters in body
|
Sep 9, 2019 at 23:08 | comment | added | Mark R | You are welcome - I just wish my attempts were helpful. I changed the accuracy goal, ran for values of n between 110 and 290, did the fit, and it is going to take a long time (the fit says about 879K seconds). I think one of the ninjas will have to weigh in on how to either profile this or figure it out. One perplexing thing is that there seems to be a performance cliff at n=101. Meaning it returns a value (even without saving the previous result) nearly instantaneously for n=100 and takes noticeably longer for n=101. | |
Sep 9, 2019 at 22:50 | comment | added | Matheus Manzatto | @MarkR Thx very much for helping me :). | |
Sep 9, 2019 at 22:41 | comment | added | Mark R | My next thought is to change the AccuracyGoal with NIntegrate. I'm trying that experiment now. | |
Sep 9, 2019 at 22:35 | comment | added | Mark R | Yes, you are correct. The values you are saving are quite large however (n^2) so you are trading off computation with storage. My optimism in how long it would take didn't yield a quick answer. It has been running for 4 hours for me and is still not done. | |
Sep 9, 2019 at 18:55 | history | edited | Matheus Manzatto | CC BY-SA 4.0 |
deleted 2 characters in body
|
Sep 9, 2019 at 18:50 | comment | added | Matheus Manzatto | I used ''P[a_, b_, [Sigma]_, n_] := P[a, b, [Sigma], n] = '' just becuase I will need to use this matrix Q= P[a, b, [Sigma], n] several times, if I only do this ''P[a_, b_, [Sigma]_, n_] := (*my function")" then every time I need Q, my computer will calculate everything again. (Am I right?) | |
Sep 9, 2019 at 18:11 | comment | added | Mark R | I tried your problem with smaller n and then decided to determine how the solution time relates to n. The algorithm that you are using "fits" with the following equation: -0.0511155 + 0.00600536 n + 0.0000174545 n^2 + 8.46694*10^-7 n^3 so with n of 10000, the time should be 848,500 seconds, or 235 hours. I then eliminated your assignment for P and the result was a timing that is dramatically smaller. I'm re-running now. What I mean by eliminating the assignment is don't have the second P with "=" after the delayed assignment ":=" | |
Sep 9, 2019 at 17:47 | history | edited | Matheus Manzatto | CC BY-SA 4.0 |
deleted 1 character in body
|
Sep 9, 2019 at 17:40 | history | edited | Matheus Manzatto | CC BY-SA 4.0 |
added 56 characters in body
|
Sep 9, 2019 at 17:35 | history | edited | Matheus Manzatto | CC BY-SA 4.0 |
added 56 characters in body
|
Sep 9, 2019 at 17:30 | history | edited | Matheus Manzatto | CC BY-SA 4.0 |
added 56 characters in body
|
Sep 9, 2019 at 17:23 | history | asked | Matheus Manzatto | CC BY-SA 4.0 |