mirror of
https://github.com/pjh456/OxideJS.git
synced 2026-10-23 18:21:13 +08:00
perf: 移除 JsString 死哈希字段,消除每次字符串创建的 O(n) FxHash 开销
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user