mirror of
https://github.com/pjh456/OxideJS.git
synced 2026-10-25 11:11:11 +08:00
perf: 字符串拼接按操作数字节长预分配容量,免几何 realloc 二次拷贝
This commit is contained in:
@@ -97,7 +97,6 @@ impl Vm {
|
||||
ic_misses: std::cell::Cell::new(0),
|
||||
instruction_count: 0,
|
||||
},
|
||||
string_buf: String::new(),
|
||||
cell_stack: Vec::new(),
|
||||
};
|
||||
vm.init_generator_intrinsics();
|
||||
@@ -190,7 +189,6 @@ impl Vm {
|
||||
ic_misses: std::cell::Cell::new(0),
|
||||
instruction_count: 0,
|
||||
},
|
||||
string_buf: String::new(),
|
||||
cell_stack: Vec::new(),
|
||||
};
|
||||
vm.init_generator_intrinsics();
|
||||
|
||||
Reference in New Issue
Block a user