Op Sunday 3 May 2015 12:21 CEST schreef Mark Lawrence: >> That looks very promising. But I use the test to verify the >> correctness and show the performance. Is that also possible? Or >> should I split those out. >> > > Get it working correctly and if it's fast enough for your needs then > job done. If and only if you actually have a performance issue > profile your code to find the bottlenecks, as gut instinct about > Python performance is wrong 99.99% of the time.
I'll split them out. One is to verify the correctness, the other is to show the difference between implementations. For example: even with memoization the recursive version of fibonacci is much slower as the iterative version. -- Cecil Westerhof Senior Software Engineer LinkedIn: http://www.linkedin.com/in/cecilwesterhof -- https://mail.python.org/mailman/listinfo/python-list