1
1
Fork 0
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:
Eelco Dolstra 2019-04-23 12:20:27 +02:00
parent 2160258cc4
commit 742a8046de
10 changed files with 107 additions and 78 deletions

View file

@ -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().