1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

v.table: minimize re-allocations on << to table.types

This commit is contained in:
Delyan Angelov 2021-02-22 16:24:57 +02:00
parent 2516c07614
commit 467dce6be6
No known key found for this signature in database
GPG Key ID: 66886C0F12D595ED

View File

@ -86,7 +86,9 @@ mut:
}
pub fn new_table() &Table {
mut t := &Table{}
mut t := &Table{
types: []TypeSymbol{cap: 64000}
}
t.register_builtin_type_symbols()
t.is_fmt = true
return t