Skip to content

Commit dffde26

Browse files
committed
Add note on cold
1 parent c313cf4 commit dffde26

File tree

1 file changed

+4
-0
lines changed
  • sdk/pinocchio/src/entrypoint

1 file changed

+4
-0
lines changed

sdk/pinocchio/src/entrypoint/mod.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,10 @@ macro_rules! process_accounts {
267267
/// - `accounts_slice` pointer must point to a slice of `AccountInfo`s
268268
/// already initialized.
269269
/// - `index` is a valid index in the `accounts_slice`.
270+
//
271+
// Note: The function is marked as `cold` to stop the compiler from optimizing the
272+
// parsing of duplicated accounts, which leads to an overall increase in CU
273+
// consumption.
270274
#[cold]
271275
#[inline(always)]
272276
unsafe fn clone_account_info(

0 commit comments

Comments
 (0)