lib: less allocations