Yes, but what about the %timeit stuff, as near as I can tell the important part of your function is commented out. Did you mean to do that? If so, this may be a case where it would be good to use the timing function built in to Python. I can't remember how to use it off the top of my head, but we can change it tomorrow if you want.