全部笔记
笔记本
Skills
从第一篇读起- macos-liquid-glassswift // Signature: .glassEffect( glass: Glass = .regular, in shape: S = DefaultGlassEffectShape, isEnabled: Bool = true) Text("Status") .padding(.horizontal, 12) .padding(.vertical, 6) .glassEffect(.
- optimizing-rust-performancerust // ❌ O(n):删中间元素要把后面所有元素左移 self.items.remove(index); // ✅ O(1):末尾元素换位,不保证顺序 self.items.swapremove(index); rust // ❌ 分配第二个 Vec + 每个元素 clone let mut kept = Vec::new(); for item in &self.items { if i
- rust-advanced-performancetoml [profile.release-thin] inherits = "release" lto = "thin" rust // Cargo.toml: mimalloc = "0.1" use mimalloc::MiMalloc; #[globalallocator] static GLOBAL: MiMalloc = MiMalloc; rust pub fn addeach(va
只列出已发布的笔记。