Post Avc4lOGuFY3pxwDecK by Coyote@social.singing.dog
(DIR) More posts by Coyote@social.singing.dog
(DIR) Post #Avbhr7eee883Dl5jl2 by bonkmaykr@canithesis.org
2025-06-29T01:28:12Z
0 likes, 0 repeats
the first result for "small vector" library for C++ is like three times the fucking size of the glibc vector and 6000 lines of code, make that make sense
(DIR) Post #Avc4lOGuFY3pxwDecK by Coyote@social.singing.dog
2025-06-29T05:44:50.485224Z
1 likes, 0 repeats
@bonkmaykr "Small vector" is a term of art for a vector that has its storage within the object itself instead of allocated dynamically (see "small string optimization" for an analog as to why it means that). In that sense, it's closer to an array, but it can grow and shrink within its maximum size instead of being fixed at declaration. With all the template plumbing that comes with generic containers and the fact that the contained data isn't stored separately, "small vectors" are neither small in code nor byte size.