mirror of
https://github.com/NixOS/nix.git
synced 2025-11-16 07:22:43 +01:00
Store short strings in Values
The vast majority of strings are < 16 bytes, and so can be stored directly in a Value. This saves a heap allocation and an indirection.
This commit is contained in:
parent
2160258cc4
commit
742a8046de
10 changed files with 107 additions and 78 deletions
|
|
@ -106,9 +106,10 @@ void GC::gc()
|
|||
case tNull:
|
||||
case tList0:
|
||||
case tFloat:
|
||||
case tShortString:
|
||||
break;
|
||||
|
||||
case tString: {
|
||||
case tLongString: {
|
||||
auto obj2 = (Value *) obj;
|
||||
// FIXME: GC string
|
||||
// See setContext().
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue