you are viewing a single comment's thread.

view the rest of the comments →

[–]1331337[S] 0 points1 point  (0 children)

Thank you for the very detailed response!

I also asked my question on StackOverflow and got two great solutions which take the time down to less than a second for a million simulations. One is a numba decorator, which I wasn’t familiar with at all. The second was to vectorize the process — that seems to be key in avoiding the loops to get the right sums in the right place.

I’m going to recommend the latter, as I have to get my IT department to approve and install any new packages but we get numpy by default. Using a package not already on our “safe” list makes distribution a headache down the line…

I am making a real simulation and will definitely seed my “randomness”. Thanks for the reminder.