c*****t 发帖数: 1879 | 1 I've seen in my code and Sun's code many times:
copy (src, dst, srcStart, srcPixelStride, srcRowStride,
dstStart, dstPixelStride, dstRowStride);
Array copy is extremely slow, that's why Sun provided System.arraycopy,
but it only works for continuous array copy. The function above is
used extremely often in image processing, all the code I've seen use
slow Java loop. And that costs significant performance :( | m******t 发帖数: 2416 | 2
If it's so widely used in image processing, I'm sure somewhere someone has
got a nice C library and a JNI interface...
【在 c*****t 的大作中提到】 : I've seen in my code and Sun's code many times: : copy (src, dst, srcStart, srcPixelStride, srcRowStride, : dstStart, dstPixelStride, dstRowStride); : Array copy is extremely slow, that's why Sun provided System.arraycopy, : but it only works for continuous array copy. The function above is : used extremely often in image processing, all the code I've seen use : slow Java loop. And that costs significant performance :(
|
|