mirror of
https://github.com/tursodatabase/limbo.git
synced 2025-08-04 18:18:03 +00:00
Prevent double allocations for VFilter args in vdbe
This commit is contained in:
parent
e17fd7edc4
commit
d53c60e071
2 changed files with 12 additions and 10 deletions
|
@ -979,9 +979,14 @@ pub fn op_vfilter(
|
|||
let has_rows = {
|
||||
let mut cursor = state.get_cursor(*cursor_id);
|
||||
let cursor = cursor.as_virtual_mut();
|
||||
let mut args = Vec::new();
|
||||
let mut args = Vec::with_capacity(*arg_count);
|
||||
for i in 0..*arg_count {
|
||||
args.push(state.registers[args_reg + i].get_owned_value().clone());
|
||||
args.push(
|
||||
state.registers[args_reg + i]
|
||||
.get_owned_value()
|
||||
.clone()
|
||||
.to_ffi(),
|
||||
);
|
||||
}
|
||||
let idx_str = if let Some(idx_str) = idx_str {
|
||||
Some(state.registers[*idx_str].get_owned_value().to_string())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue