>>> Does xrange create an array of numbers 1...1e8? >> >> Yes, it does >> >No, it doesn't. Well, if it did create an array Matlab-style, then that would account for why the C routine was faster.