[Numpy-discussion] Speed performance on array constant set
Mark Heslep
mark at mitre.org
Thu Jan 19 20:24:01 CST 2006
Travis Oliphant wrote:
> This is actually a bit surprising that opencv can create and fill so
> quickly. Perhaps they are using optimized SSE functions for the
> Intel platform, or something?
> -Travis
>
Ah, sorry, Im an unintentional fraud. Yes I have Intel's optimization
library IPP turned on and had forgotten about it. So one more time:
With IPP on as before. UseOptimized = # of Cv functions available w/ IPP
> python -m timeit -s "import opencv.cv as cv; print
> cv.cvUseOptimized(1); im =cv.cvCreateImage(cv.cvSize(1000,1000), 8,
> 1)" "cv.cvSet( im, cv.cvRealScalar( 7 ) )"
> 305
> 305
> 305
> 305
> 305
> 100 loops, best of 3: 2.24 msec per loop
And without:
> python -m timeit -s "import opencv.cv as cv; print
> cv.cvUseOptimized(0); im =cv.cvCreateImage(cv.cvSize(1000,1000), 8,
> 1)" "cv.cvSet( im, cv.cvRealScalar( 7 ) )"
> 0
> 0
> 0
> 0
> 0
> 100 loops, best of 3: 6.94 msec per loop
So IPP gives me 3X, which leads me to ask about plans for IPP / SSE for
NumPy, no offense intended to non Intel users. I believe I recall some
post that auto code generation in NumArray was the road block?
Mark
More information about the Numpy-discussion
mailing list