perf: Add cross-platform architecture support and remove test code

This commit is contained in:
ysq
2025-10-07 13:27:08 +08:00
parent 657d6bc83e
commit 2e7b9819d3
4 changed files with 87 additions and 120 deletions
+1 -32
View File
@@ -152,35 +152,4 @@ impl ExecutionPath {
slow_path()
}
}
}
#[cfg(test)]
mod tests {
use super::*;
use solana_sdk::system_instruction;
#[test]
fn test_instruction_preprocessing() {
let instructions = vec![
system_instruction::transfer(
&Pubkey::new_unique(),
&Pubkey::new_unique(),
1000,
),
];
assert!(InstructionProcessor::preprocess(&instructions).is_ok());
}
#[test]
fn test_memory_ops() {
let src = vec![1u8, 2, 3, 4, 5];
let mut dst = vec![0u8; 5];
unsafe {
MemoryOps::copy(dst.as_mut_ptr(), src.as_ptr(), src.len());
}
assert_eq!(src, dst);
}
}
}