sigh, Java needs arraycopy for imaging# Java - 爪哇娇娃
c*t
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 :(
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 :(