1 | initial version |
Assuming you need a separate copy in each, you should use .clone() to make copies. All clone does is a memcopy which might happen entirely within the CPU, whereas saving the image to disk involves multiple RAM and disk accesses. This should be obvious even in the simplest test.