<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:10pt"><div class="question-body"> <div>Hi experts!</div><div><br></div> <div>I wanna use less RAM memory in my Monte Carlo simulations. In my algorithm I use numpy arrays and <code>xrange()</code> function.</div> <div>I hear that I can reduce RAM used in my lagorithm if I do the next:</div><div><br></div> <div>1) replace <code>xrange()</code> for <code>range()</code>. <br></div><div>2) replace numpya arrays for python lists <br></div><div style="color: rgb(0, 0, 0); font-size: 13.3333px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;">3) use <code>reset()</code> function for deleting useless arrays. <br></div><div style="color: rgb(0, 0, 0); font-size: 13.3333px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;">Is that
true?</div><div style="color: rgb(0, 0, 0); font-size: 13.3333px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;"><br></div><div style="color: rgb(0, 0, 0); font-size: 13.3333px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;">In adition, I wanna increase execution speed of my code (I use numpy and SciPy functions). How can I apply Cython? Will it help?<br></div><div style="color: rgb(0, 0, 0); font-size: 13.3333px; font-family: monospace; background-color: transparent; font-style: normal;"><br></div> <div>Please help.</div><div><br></div> <div>Thanks a lot!!</div></div><br></div></body></html>