Yggdrasil
首页笔记归档友链关于
搜索⌘K
全部笔记

笔记本

Skills

3 篇按阅读顺序编排更新于 11.24

从第一篇读起
  1. 01macos-liquid-glassswift // Signature: .glassEffect( glass: Glass = .regular, in shape: S = DefaultGlassEffectShape, isEnabled: Bool = true) Text("Status") .padding(.horizontal, 12) .padding(.vertical, 6) .glassEffect(.随记 · 11.24
  2. 02optimizing-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随记 · 11.24
  3. 03rust-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随记 · 11.24

只列出已发布的笔记。

© 2026 Yggdrasil
RSS更新日志写作指南由 Rust 与 Leptos 构建