Calls to Plaintext::write_bits_le are responsible for a large number of allocations when performing deployments and executions; using a few simple tweaks we can reduce that number by as much as ~18% in some scenarios (my run was performed on a large deployment and execution).
Also, since we are dealing with OnceCell here, the additional calls to Vec::shrink_to_fit should be perfectly acceptable and slightly reduce heap use.
Calls to
Plaintext::write_bits_le
are responsible for a large number of allocations when performing deployments and executions; using a few simple tweaks we can reduce that number by as much as ~18% in some scenarios (my run was performed on a large deployment and execution).Also, since we are dealing with
OnceCell
here, the additional calls toVec::shrink_to_fit
should be perfectly acceptable and slightly reduce heap use.