Re: Performance comparison Q
Magnus Lie Hetland <[email protected]> Mon, 9 May 2005 21:58:20 +0200
| Newsgroups | gmane.comp.db.metakit |
|---|---|
| Message-ID | <[email protected]> |
Jean-Claude Wippler <[email protected]>: > [snip] > The point is not the result (25000*49999 will get there a lot > faster). Of course. I'm sorry -- I misread your original request (didn't read the code thoroughly enough). I thought you just wanted to add the numbers (i.e., those specific numbers) and see how long it took. > I'm trying to see how a list of values, iteration over it, and a > simple integer operator work together in each particular language. I see. > Don't quite see the same speedup for xrange, but as I said it is not > the issue here for me. Indeed. I'd recommend trying a plain for-loop together with psyco if you're running on an x86 machine. Armin Rigo (its author) has outperformed the built-in list sort method in Python by a naive Quicksort implementation + psyco, for example. Psyco is really good with lists of integers (because it translates the code directly into machine language operations on integer arrays, instead of going through Python objects, which the built-ins like list.sort() or reduce() must do). Sorry again for missing the point ;) -- Magnus Lie Hetland Fall seven times, stand up eight http://hetland.org [Japanese proverb] _____________________________________________ Metakit mailing list - [email protected] http://www.equi4.com/mailman/listinfo/metakit