[Numpy-discussion] Numpy Benchmarking (original) (raw)
Robert Kern robert.kern at gmail.com
Tue Jun 27 19:50:19 EDT 2006
- Previous message (by thread): [Numpy-discussion] Numpy Benchmarking
- Next message (by thread): [Numpy-discussion] Numpy Benchmarking
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Dennis V. Perepelitsa wrote:
Hi, all.
I've run some benchmarks comparing the performance of scipy, numpy, Numeric and numarray vs. MATLAB. There's also the beginnings of a benchmark framework included. The results are online at: http://web.mit.edu/jonas/www/bench/ They were produced on a Thinkpad T42 with an Intel Pentium M 1.7GHz processor running Ubuntu Dapper Drake (6.06). All the languages/packages were built from source, and, in the case of numpy and scipy, linked to ATLAS. Each datapoint represents the arithmetic mean of ten trials.
I have two suggestions based on a two-second glance at this:
- Use time.time() on UNIX and time.clock() on Windows. The usual snippet of code I use for this:
import sys import time if sys.platform == 'win32': now = time.clock else: now = time.time
t1 = now() ... t2 = now()
- Never take the mean of repeated time trials. Take the minimum if you need to summarize a set of trials.
-- Robert Kern
"I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco
- Previous message (by thread): [Numpy-discussion] Numpy Benchmarking
- Next message (by thread): [Numpy-discussion] Numpy Benchmarking
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]