All benchmarks are measured in milliseconds (ms). Some APIs will run more slowly if the client runs out of memory, during which point the faster image API operations will be swapped out for less memory intensive read/write buffer methods.
| API | Avg | Min | Max | 10 | 50 | 90 |
|---|---|---|---|---|---|---|
fill |
0.038 | 0.008 | 0.068 | 0.012 | 0.017 | 0.025 |
replace |
0.101 | 0.044 | 0.157 | 0.050 | 0.056 | 0.064 |
try-crop |
0.259 | 0.011 | 0.507 | 0.016 | 0.030 | 0.077 |
set-brightness |
1.273 | 0.822 | 1.725 | 0.873 | 0.917 | 0.966 |
add |
1.816 | 1.161 | 2.471 | 1.215 | 1.261 | 1.323 |
multiply |
1.982 | 0.812 | 3.153 | 0.877 | 0.917 | 0.973 |
isolate-channel |
2.598 | 0.821 | 4.376 | 0.880 | 0.919 | 0.984 |
overwrite |
2.786 | 1.995 | 3.578 | 2.100 | 2.178 | 2.264 |
try-clone-channel |
2.900 | 0.928 | 4.872 | 1.066 | 1.110 | 1.186 |
set-contrast |
2.905 | 2.045 | 3.765 | 2.157 | 2.230 | 2.328 |
shift-channel-rgba |
4.702 | 0.263 | 9.141 | 0.338 | 0.374 | 0.423 |
tint |
4.733 | 0.840 | 8.626 | 0.900 | 0.944 | 1.003 |
read-for-each-px-rgba |
5.236 | 4.160 | 6.311 | 4.224 | 4.277 | 4.367 |
subtract |
5.730 | 3.951 | 7.509 | 4.274 | 4.334 | 4.443 |
clear-channel |
5.841 | 0.841 | 10.842 | 0.897 | 0.936 | 0.990 |
get-channel-range-u8 |
6.152 | 3.370 | 8.933 | 3.421 | 3.481 | 3.567 |
shift-channel-rgb |
6.436 | 4.049 | 8.824 | 4.276 | 4.326 | 4.426 |
get-rgba-range-u8 |
6.838 | 4.376 | 9.300 | 4.425 | 4.486 | 4.571 |
invert-channel |
7.183 | 3.450 | 10.826 | 3.517 | 3.573 | 3.665 |
get-rgb-range-u8 |
7.424 | 3.824 | 11.023 | 3.878 | 3.936 | 4.020 |
read-for-each-px-rgb |
7.656 | 4.030 | 11.282 | 4.094 | 4.151 | 4.245 |
write-for-each-px-rgb |
8.199 | 4.734 | 11.664 | 4.793 | 4.860 | 5.032 |
normalize-channel-rgba |
8.627 | 7.222 | 10.031 | 7.320 | 7.406 | 7.553 |
to-mono |
9.052 | 4.024 | 14.079 | 4.084 | 4.148 | 4.575 |
try-split-rgb |
9.070 | 2.785 | 15.355 | 3.222 | 3.319 | 3.515 |
read-for-each-px-in-channel |
9.270 | 3.681 | 14.860 | 3.753 | 3.832 | 3.936 |
write-for-each-px-in-channel |
9.440 | 3.905 | 14.974 | 3.970 | 4.052 | 4.173 |
try-split-rgba |
10.153 | 3.687 | 16.620 | 4.292 | 4.437 | 4.681 |
normalize-channel-rgb |
10.318 | 7.196 | 13.440 | 7.308 | 7.406 | 7.553 |
write-for-each-px-rgba |
10.812 | 5.011 | 16.613 | 5.105 | 5.181 | 5.361 |
read-for-each-px-hsva |
11.954 | 8.698 | 15.210 | 8.755 | 8.845 | 8.962 |
normalize-rgb |
12.400 | 8.813 | 15.987 | 8.987 | 9.085 | 9.230 |
read-for-each-px-hsv |
13.861 | 8.590 | 19.132 | 8.647 | 8.741 | 8.870 |
multiply-hsv-skip-mod |
14.186 | 10.536 | 17.837 | 12.818 | 13.022 | 13.282 |
normalize-rgba |
15.146 | 10.179 | 20.113 | 10.287 | 10.386 | 10.541 |
write-for-each-px-hsva |
15.356 | 13.028 | 17.685 | 13.156 | 13.287 | 13.511 |
multiply-hsv-mod |
15.776 | 12.809 | 18.744 | 13.108 | 13.436 | 13.746 |
add-hsv-mod |
16.378 | 11.180 | 20.896 | 13.088 | 13.454 | 13.770 |
add-hsv-skip-mod |
16.631 | 12.604 | 20.659 | 12.818 | 13.022 | 13.286 |
write-for-each-px-hsv |
16.835 | 12.711 | 20.959 | 12.795 | 12.930 | 13.133 |
try-resize |
22.183 | 0.019 | 44.348 | 0.366 | 3.115 | 20.956 |