mirror of
https://github.com/pjh456/OxideJS.git
synced 2026-10-25 19:21:11 +08:00
perf: 字符串拼接按操作数字节长预分配容量,免几何 realloc 二次拷贝
This commit is contained in:
@@ -348,8 +348,6 @@ pub struct Vm {
|
||||
/// 分组保存 inline cache 与指令计数器。
|
||||
pub(crate) profiling: ProfilingState,
|
||||
pub(crate) cell_stack: Vec<Vec<*mut Cell>>,
|
||||
/// 可复用字符串缓冲区,避免每次 `+` 拼接都分配。
|
||||
pub(crate) string_buf: String,
|
||||
}
|
||||
|
||||
impl Vm {
|
||||
|
||||
Reference in New Issue
Block a user