There's no reason a JIT'd runtime is going to find this job challenging or slow at all.
I don't know what OP's original code is but maybe OP was calling a Canvas API method for every pixel (super bad).
I don't know what OP's original code is but maybe OP was calling a Canvas API method for every pixel (super bad).