6 ms·
Another data point: MATLAB, glnxa64 AVX2, 12 core >> maxNumCompThreads(1); >> im = randi(255, [2560, 1600, 3],'uint8'); >> timeit(@()imresize(im,[320,200],'b
by ashishuthama 9y ago
Another data point:
MATLAB, glnxa64 AVX2, 12 core
>> maxNumCompThreads(1);
>> im = randi(255, [2560, 1600, 3],'uint8');
>> timeit(@()imresize(im,[320,200],'bilinear','Antialiasing',false))
ans =
0.0083
>> timeit(@()imresize(im,[320,200],'bilinear'))
ans =
0.0301
>> maxNumCompThreads(6);
>> timeit(@()imresize(im,[320,200],'bilinear','Antialiasing',false))
ans =
0.0062
>> timeit(@()imresize(im,[320,200],'bilinear'))
ans =
0.0113
Oh, missed that lanczos2 part:
>> maxNumCompThreads(1);
>> timeit(@()imresize(im,[320,200],'lanczos2','Antialiasing',false))
ans =
0.0146
>> maxNumCompThreads(6);
>> timeit(@()imresize(im,[320,200],'lanczos2','Antialiasing',false))
ans =
0.0049
Since MATLAB tries to do most of the computation in double precision, its harder to extract much from SIMD.