Benchmark results for Solana runtime operations.
- CU Consumed: Total compute units consumed by the profiled function
- CU Adjusted: Actual operation cost with baseline profiling overhead subtracted (CU Consumed - Baseline CU)
- Baseline CU: CU consumed by an empty profiled function (
#[profile]macro overhead)
| Function | CU Consumed | CU Adjusted |
|---|---|---|
| baseline_empty_function | 6 | N/A |
| Function | CU Consumed | CU Adjusted |
|---|---|---|
| new | 10 | 4 |
| with_capacity_10 | 8 | 2 |
| with_capacity_100 | 27 | 21 |
| assign_u8 | 9 | 3 |
| assign_u64 | 16 | 10 |
| assign_pubkey | 108 | 102 |
| assign_10_u8 | 9 | 3 |
| assign_10_u64 | 16 | 10 |
| assign_10_pubkey | 108 | 102 |
| array_u8_32_index | 9 | 3 |
| array_u8_32_get | 6 | 0 |
| array_u8_32_get_ok_or | 6 | 0 |
| array_u8_32_if_let_get | 9 | 3 |
| array_u64_10_index | 9 | 3 |
| array_u64_10_get | 6 | 0 |
| array_u64_10_get_ok_or | 6 | 0 |
| array_u64_10_if_let_get | 9 | 3 |
| Function | CU Consumed | CU Adjusted |
|---|---|---|
| u8_new | 7 | 1 |
| push_pubkey | 29 | 23 |
| push_u64 | 22 | 16 |
| push_u8 | 20 | 14 |
| u8_with_capacity_10 | 7 | 1 |
| u8_with_capacity_100 | 7 | 1 |
| push_10_u8 | 10 | 4 |
| push_10_u64 | 17 | 11 |
| push_10_pubkey | 87 | 81 |
| get_first_pubkey | 6 | 0 |
| get_10th_pubkey | 6 | 0 |
| find_pubkey_1_iters | 18 | 12 |
| find_pubkey_10_iters | 38 | 32 |
| position_pubkey_1_iters | 42 | 36 |
| position_pubkey_10_iters | 96 | 90 |
| update_index | 14 | 8 |
| update_get_mut | 14 | 8 |
| update_iter_mut_find | 24 | 18 |
| Function | CU Consumed | CU Adjusted |
|---|---|---|
| u8_new | 6 | 0 |
| u8_with_capacity_10 | 6 | 0 |
| u8_with_capacity_100 | 6 | 0 |
| push_u8 | 10 | 4 |
| push_u64 | 10 | 4 |
| push_pubkey | 15 | 9 |
| push_10_u8 | 84 | 78 |
| push_10_u64 | 101 | 95 |
| push_10_pubkey | 88 | 82 |
| get_first_pubkey | 6 | 0 |
| get_10th_pubkey | 6 | 0 |
| find_pubkey_1_iters | 18 | 12 |
| find_pubkey_10_iters | 38 | 32 |
| position_pubkey_1_iters | 42 | 36 |
| position_pubkey_10_iters | 96 | 90 |
| update_index | 14 | 8 |
| update_get_mut | 14 | 8 |
| update_iter_mut_find | 23 | 17 |
| Function | CU Consumed | CU Adjusted |
|---|---|---|
| u8_new | 6 | 0 |
| u8_with_capacity_10 | 6 | 0 |
| u8_with_capacity_128 | 6 | 0 |
| push_u8 | 25 | 19 |
| push_u64 | 27 | 21 |
| push_pubkey | 33 | 27 |
| push_10_u8 | 10 | 4 |
| push_10_u64 | 17 | 11 |
| push_10_pubkey | 87 | 81 |
| get_first_pubkey | 6 | 0 |
| get_10th_pubkey | 6 | 0 |
| find_pubkey_1_iters | 20 | 14 |
| find_pubkey_10_iters | 38 | 32 |
| position_pubkey_1_iters | 44 | 38 |
| position_pubkey_10_iters | 96 | 90 |
| update_index | 14 | 8 |
| update_get_mut | 14 | 8 |
| update_iter_mut_find | 26 | 20 |
| Function | CU Consumed | CU Adjusted |
|---|---|---|
| u8_new | 6 | 0 |
| u8_with_capacity_10 | 6 | 0 |
| u8_with_capacity_100 | 6 | 0 |
| push_u8 | 8 | 2 |
| push_u64 | 8 | 2 |
| push_pubkey | 15 | 9 |
| push_10_u8 | 10 | 4 |
| push_10_u64 | 17 | 11 |
| push_10_pubkey | 87 | 81 |
| get_first_pubkey | 6 | 0 |
| get_10th_pubkey | 6 | 0 |
| find_pubkey_1_iters | 18 | 12 |
| find_pubkey_10_iters | 38 | 32 |
| position_pubkey_1_iters | 42 | 36 |
| position_pubkey_10_iters | 96 | 90 |
| update_index | 14 | 8 |
| update_get_mut | 14 | 8 |
| update_iter_mut_find | 24 | 18 |
| Function | CU Consumed | CU Adjusted |
|---|---|---|
| u8_new | 6 | 0 |
| push_u8 | 8 | 2 |
| push_u64 | 8 | 2 |
| push_pubkey | 15 | 9 |
| push_10_u8 | 161 | 155 |
| push_10_u64 | 163 | 157 |
| push_10_pubkey | 256 | 250 |
| Function | CU Consumed | CU Adjusted |
|---|---|---|
| u8_new | 9 | 3 |
| u8_with_capacity_10 | 113 | 107 |
| u8_with_capacity_100 | 113 | 107 |
| push_u8 | 73 | 67 |
| push_u64 | 78 | 72 |
| push_pubkey | 84 | 78 |
| push_10_u8 | 202 | 196 |
| push_10_u64 | 313 | 307 |
| push_10_pubkey | 382 | 376 |
| push_u8_with_capacity | 120 | 114 |
| push_u64_with_capacity | 120 | 114 |
| push_pubkey_with_capacity | 127 | 121 |
| push_10_u8_with_capacity | 153 | 147 |
| push_10_u64_with_capacity | 149 | 143 |
| push_10_pubkey_with_capacity | 218 | 212 |
| vec_u8_32_index | 9 | 3 |
| vec_u8_32_get | 8 | 2 |
| vec_u8_32_get_ok_or | 8 | 2 |
| vec_u8_32_if_let_get | 9 | 3 |
| vec_u64_10_index | 9 | 3 |
| vec_u64_10_get | 8 | 2 |
| vec_u64_10_get_ok_or | 8 | 2 |
| vec_u64_10_if_let_get | 9 | 3 |
| Function | CU Consumed | CU Adjusted |
|---|---|---|
| u16_as_u8 | 7 | 1 |
| u16_as_u32 | 7 | 1 |
| u16_as_u64 | 7 | 1 |
| u16_as_usize | 7 | 1 |
| Function | CU Consumed | CU Adjusted |
|---|---|---|
| u32_as_u8 | 7 | 1 |
| u32_as_u16 | 7 | 1 |
| u32_as_u64 | 7 | 1 |
| u32_as_usize | 7 | 1 |
| Function | CU Consumed | CU Adjusted |
|---|---|---|
| u64_as_u8 | 7 | 1 |
| u64_as_u16 | 7 | 1 |
| u64_as_u32 | 7 | 1 |
| u64_as_usize | 7 | 1 |
| Function | CU Consumed | CU Adjusted |
|---|---|---|
| u8_as_u16 | 7 | 1 |
| u8_as_u32 | 7 | 1 |
| u8_as_u64 | 7 | 1 |
| u8_as_usize | 7 | 1 |
| Function | CU Consumed | CU Adjusted |
|---|---|---|
| try_into_usize_to_u64_unwrap | 7 | 1 |
| try_into_usize_to_u64_map_err | 6 | 0 |
| Function | CU Consumed | CU Adjusted |
|---|---|---|
| try_into_slice_to_array_32_unwrap | 14 | 8 |
| try_into_slice_to_array_32_map_err | 6 | 0 |
| Function | CU Consumed | CU Adjusted |
|---|---|---|
| try_into_u64_to_usize_unwrap | 7 | 1 |
| try_into_u64_to_usize_map_err | 6 | 0 |
| try_into_u32_to_usize_unwrap | 7 | 1 |
| try_into_u32_to_usize_map_err | 6 | 0 |
| try_into_u16_to_usize_unwrap | 7 | 1 |
| try_into_u16_to_usize_map_err | 6 | 0 |
| try_into_u8_to_usize_unwrap | 7 | 1 |
| try_into_u8_to_usize_map_err | 6 | 0 |
| Function | CU Consumed | CU Adjusted |
|---|---|---|
| add_u8 | 7 | 1 |
| add_u16 | 7 | 1 |
| add_u32 | 8 | 2 |
| add_u64 | 8 | 2 |
| add_u128 | 10 | 4 |
| sub_u8 | 7 | 1 |
| sub_u16 | 7 | 1 |
| sub_u32 | 8 | 2 |
| sub_u64 | 8 | 2 |
| sub_u128 | 10 | 4 |
| mul_u8 | 7 | 1 |
| mul_u16 | 7 | 1 |
| mul_u32 | 8 | 2 |
| mul_u64 | 8 | 2 |
| mul_u128 | 10 | 4 |
| div_u8 | 7 | 1 |
| div_u16 | 7 | 1 |
| div_u32 | 8 | 2 |
| div_u64 | 8 | 2 |
| div_u128 | 10 | 4 |
| Function | CU Consumed | CU Adjusted |
|---|---|---|
| add_u8 | 7 | 1 |
| add_u16 | 7 | 1 |
| add_u32 | 7 | 1 |
| add_u64 | 7 | 1 |
| add_u128 | 8 | 2 |
| sub_u8 | 7 | 1 |
| sub_u16 | 7 | 1 |
| sub_u32 | 7 | 1 |
| sub_u64 | 7 | 1 |
| sub_u128 | 8 | 2 |
| mul_u8 | 7 | 1 |
| mul_u16 | 7 | 1 |
| mul_u32 | 7 | 1 |
| mul_u64 | 7 | 1 |
| mul_u128 | 8 | 2 |
| Function | CU Consumed | CU Adjusted |
|---|---|---|
| add_u8 | 6 | 0 |
| add_u16 | 6 | 0 |
| add_u32 | 6 | 0 |
| add_u64 | 6 | 0 |
| add_u128 | 6 | 0 |
| sub_u8 | 6 | 0 |
| sub_u16 | 6 | 0 |
| sub_u32 | 6 | 0 |
| sub_u64 | 6 | 0 |
| sub_u128 | 6 | 0 |
| mul_u8 | 6 | 0 |
| mul_u16 | 6 | 0 |
| mul_u32 | 6 | 0 |
| mul_u64 | 6 | 0 |
| mul_u128 | 6 | 0 |
| div_u8 | 6 | 0 |
| div_u16 | 6 | 0 |
| div_u32 | 6 | 0 |
| div_u64 | 6 | 0 |
| div_u128 | 6 | 0 |
| add_assign_u8 | 7 | 1 |
| add_assign_u16 | 7 | 1 |
| add_assign_u32 | 7 | 1 |
| add_assign_u64 | 7 | 1 |
| add_assign_u128 | 9 | 3 |
| sub_assign_u8 | 7 | 1 |
| sub_assign_u16 | 7 | 1 |
| sub_assign_u32 | 7 | 1 |
| sub_assign_u64 | 7 | 1 |
| sub_assign_u128 | 9 | 3 |
| Function | CU Consumed | CU Adjusted |
|---|---|---|
| checked_add_u8_unwrap | 7 | 1 |
| checked_add_u8_ok_or | 6 | 0 |
| checked_add_u8_ok_or_else | 6 | 0 |
| checked_add_u8_unwrap_or_default | 8 | 2 |
| checked_add_u8_unwrap_or | 8 | 2 |
| Function | CU Consumed | CU Adjusted |
|---|---|---|
| if_let_some_u8 | 6 | 0 |
| if_let_some_array | 14 | 8 |
| if_let_some_pubkey | 14 | 8 |
| if_let_some_array_ref | 6 | 0 |
| Function | CU Consumed | CU Adjusted |
|---|---|---|
| pubkey_ref_map_deref | 6 | 0 |
| pubkey_as_ref_map_convert | 6 | 0 |
| Function | CU Consumed | CU Adjusted |
|---|---|---|
| slice_get_array_unwrap | 14 | 8 |
| slice_get_array_ok_or | 6 | 0 |
| slice_get_array_ok_or_else | 6 | 0 |
| slice_get_array_unwrap_or_default | 14 | 8 |
| slice_get_array_unwrap_or | 14 | 8 |
| Function | CU Consumed | CU Adjusted |
|---|---|---|
| array_u8_32_ref | 7 | 1 |
| array_u8_32 | 6 | 0 |
| array_u16_32 | 7 | 1 |
| array_u32_32 | 7 | 1 |
| array_u64_32 | 7 | 1 |
| Function | CU Consumed | CU Adjusted |
|---|---|---|
| u8_neq | 9 | 3 |
| u16_neq | 9 | 3 |
| u32_neq | 10 | 4 |
| u64_neq | 10 | 4 |
| u128_neq | 13 | 7 |
| array_u8_32_neq_ref | 35 | 29 |
| array_u8_32_neq | 31 | 25 |
| array_u8_32_neq_deref | 35 | 29 |
| array_u16_32_neq | 33 | 27 |
| array_u32_32_neq | 34 | 28 |
| array_u64_32_neq | 34 | 28 |
| Function | CU Consumed | CU Adjusted |
|---|---|---|
| u8 | 7 | 1 |
| u16 | 7 | 1 |
| u32 | 7 | 1 |
| u64 | 7 | 1 |
| u128 | 7 | 1 |
| Function | CU Consumed | CU Adjusted |
|---|---|---|
| key | 9 | 3 |
| owner | 9 | 3 |
| is_signer | 12 | 6 |
| is_writable | 11 | 5 |
| executable | 12 | 6 |
| data_len | 9 | 3 |
| lamports | 9 | 3 |
| data_is_empty | 12 | 6 |
| is_owned_by | 30 | 24 |
| assign | 15 | 9 |
| is_borrowed | 12 | 6 |
| borrow_lamports_unchecked | 9 | 3 |
| borrow_mut_lamports_unchecked | 9 | 3 |
| borrow_data_unchecked | 8 | 2 |
| borrow_mut_data_unchecked | 8 | 2 |
| try_borrow_lamports | 16 | 10 |
| try_borrow_mut_lamports | 11 | 5 |
| can_borrow_lamports | 8 | 2 |
| can_borrow_mut_lamports | 8 | 2 |
| try_borrow_data | 15 | 9 |
| try_borrow_mut_data | 12 | 6 |
| can_borrow_data | 8 | 2 |
| can_borrow_mut_data | 8 | 2 |
| realloc | 16 | 10 |
| Function | CU Consumed | CU Adjusted |
|---|---|---|
| account_meta_array_10 | 6 | 0 |
| account_info_array_10_ref | 6 | 0 |
| account_info_array_10_clone | 6 | 0 |
| account_info_array_10_move | 6 | 0 |
| arrayvec_push_account_meta_10 | 179 | 173 |
| arrayvec_push_account_info_10_ref | 6 | 0 |
| arrayvec_push_account_info_10_clone | 7 | 1 |
| arrayvec_push_account_info_10_move | 7 | 1 |
| account_meta_array_10_loop | 201 | 195 |
| account_info_array_10_ref_loop | 6 | 0 |
| account_info_array_10_clone_loop | 7 | 1 |
| account_info_array_10_move_loop | 7 | 1 |
| Function | CU Consumed | CU Adjusted |
|---|---|---|
| msg10_chars | 110 | 104 |
| Function | CU Consumed | CU Adjusted |
|---|---|---|
| clock_get_slot | 171 | 165 |
| Function | CU Consumed | CU Adjusted |
|---|---|---|
| sysvar_rent_exemption_165 | 151 | 145 |
| Function | CU Consumed | CU Adjusted |
|---|---|---|
| borsh_deserialize | 428 | 422 |
| zero_copy_deserialize | 130 | 124 |
| wincode_deserialize | 432 | 426 |
| bincode_deserialize | 3231 | 3225 |
| borsh1_deserialize | 428 | 422 |
| rkyv_zero_copy_deserialize | 178 | 172 |
| wincode_shortvec_deserialize | 430 | 424 |
| Function | CU Consumed | CU Adjusted |
|---|---|---|
| msg10_chars | 110 | 104 |
| Function | CU Consumed | CU Adjusted |
|---|---|---|
| msg_program_id | 6953 | 6947 |
| Function | CU Consumed | CU Adjusted |
|---|---|---|
| pubkey_new_from_array | 14 | 8 |
| Function | CU Consumed | CU Adjusted |
|---|---|---|
| pubkey_to_bytes | 14 | 8 |
| Function | CU Consumed | CU Adjusted |
|---|---|---|
| collect_vec_1_seed | 18 | 12 |
| collect_vec_3_seeds | 57 | 51 |
| collect_vec_16_seeds | 161 | 155 |
| collect_arrayvec_1_seed | 9 | 3 |
| collect_arrayvec_3_seeds | 34 | 28 |
| collect_arrayvec_16_seeds | 543 | 537 |
| collect_arrayvec_3_seeds_16_capacity | 255 | 249 |
| array_3_seeds | 23 | 17 |
| array_3_seeds_maybeuninit | 20 | 14 |
| array_3_seeds_maybeuninit_no_transmute | 18 | 12 |
| array_3_seeds_ptr | 19 | 13 |