-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Open
Labels
breakingImplementing this issue could cause existing code to no longer compile or have different behavior.Implementing this issue could cause existing code to no longer compile or have different behavior.enhancementSolving this issue will likely involve adding new logic or components to the codebase.Solving this issue will likely involve adding new logic or components to the codebase.standard libraryThis issue involves writing Zig code for the standard library.This issue involves writing Zig code for the standard library.
Milestone
Description
Hello, i started to use Zig recently to write my personal project and i think it's great!
However i found defaut behaviour of std.json.Value not fitting to me due to large amount of small nested objects. Currently it's managed HashMap for object (arrays are also managed) because of that my memory usage is about 40% larger due to allocation of allocator.
I made simple copy of std.json.Value into my project, changing HashMap and Array into unmanaged variants, added allocator to method calls and as expected my memory usage was smaller, without any immediate issues.
Is there any reason for managed state being default one?
If so maybe there should be also unmanaged variant.
Metadata
Metadata
Assignees
Labels
breakingImplementing this issue could cause existing code to no longer compile or have different behavior.Implementing this issue could cause existing code to no longer compile or have different behavior.enhancementSolving this issue will likely involve adding new logic or components to the codebase.Solving this issue will likely involve adding new logic or components to the codebase.standard libraryThis issue involves writing Zig code for the standard library.This issue involves writing Zig code for the standard library.