perf: 移除 JsString 死哈希字段,消除每次字符串创建的 O(n) FxHash 开销

This commit is contained in:
爱特每羊队
2026-06-30 20:04:37 +08:00
parent 429cb6d9de
commit 2d8e5d861d
2 changed files with 6 additions and 14 deletions
+1 -1
View File
@@ -147,7 +147,7 @@ pub fn string_value_eq(a: JsValue, b: JsValue) -> bool {
}
let sa = unsafe { &*a.as_string_ptr() };
let sb = unsafe { &*b.as_string_ptr() };
sa.hash == sb.hash && sa.data == sb.data
sa.data == sb.data
}
pub fn to_number(val: JsValue) -> f64 {