help!: optimization of search problem (example code)
Marcus Stojek
stojek at part-gmbh.de
Fri Feb 15 09:41:47 EST 2002
>SciPy has a vector quantization module that does what your looking for and
>it is pretty fast.
>
>C:\temp>python vq_ex.py
>500 points ran in 0.037537 seconds
>
You are comparing two lists with 500 points each. In my example
I perform the search for 500 points out of la but I have to search
for the counterpart in lb which has 20000 points.
Nevertheless i tried scipy. Here are some times:
(same size for both lists)
500 points : 0.33557 sec
1000 points: 1.321 sec
2000 points: 6.055 sec
20000 points: 967.2 sec
My example-code needs 197.8 sec ;-)
Anyway, scipy seems to be extremly useful.
Thanks
Marcus
More information about the Python-list
mailing list