Explorar o código

perf: more aggressive inlining in `memo` and `ata` programs (#201)

* perf: add inline for invoke_signed in memo and ata programs

* fix: revert version bump
Sonic hai 4 meses
pai
achega
f61609aa54

+ 1 - 0
programs/associated-token-account/src/instructions/create.rs

@@ -36,6 +36,7 @@ impl Create<'_> {
         self.invoke_signed(&[])
     }
 
+    #[inline(always)]
     pub fn invoke_signed(&self, signers: &[Signer]) -> ProgramResult {
         // account metadata
         let account_metas: [AccountMeta; 6] = [

+ 1 - 0
programs/associated-token-account/src/instructions/create_idempotent.rs

@@ -37,6 +37,7 @@ impl CreateIdempotent<'_> {
         self.invoke_signed(&[])
     }
 
+    #[inline(always)]
     pub fn invoke_signed(&self, signers: &[Signer]) -> ProgramResult {
         // account metadata
         let account_metas: [AccountMeta; 6] = [

+ 1 - 0
programs/associated-token-account/src/instructions/recover_nested.rs

@@ -47,6 +47,7 @@ impl RecoverNested<'_> {
         self.invoke_signed(&[])
     }
 
+    #[inline(always)]
     pub fn invoke_signed(&self, signers: &[Signer]) -> ProgramResult {
         // account metadata
         let account_metas: [AccountMeta; 7] = [

+ 1 - 0
programs/memo/src/instructions/mod.rs

@@ -25,6 +25,7 @@ impl Memo<'_, '_, '_> {
         self.invoke_signed(&[])
     }
 
+    #[inline(always)]
     pub fn invoke_signed(&self, signers_seeds: &[Signer]) -> ProgramResult {
         const UNINIT_META: MaybeUninit<AccountMeta> = MaybeUninit::<AccountMeta>::uninit();