[TupleValues] Add a pre-alloc

This commit is contained in:
Behdad Esfahbod committed 2024-04-16 17:10:46 -06:00
1 parent 3ffd92f096
commit cf3ce69f00
1 file changed
+2
+2
View File
@@ -1722,6 +1722,8 @@ struct TupleValues
{
unsigned i = 0;
unsigned count = consume_all ? UINT_MAX : values.length;
if (consume_all)
values.alloc ((end - p) / 2);
while (i < count)
{
if (unlikely (p + 1 > end)) return consume_all;