[libc-commits] [libc] [wip] [libc] Implement vasprintf (PR #98824)

Joseph Huber via libc-commits libc-commits at lists.llvm.org
Fri Jul 19 11:13:06 PDT 2024


jhuber6 wrote:

I'm somewhat wondering what the actual performance implications are for the trivial implementation versus the realloc one. I.e.

size_t chars = vsnprintf(nullptr, 0, format, args)
void *buffer = malloc(chars + 1);
vsnprintf(buffer, chars, format, args);

Just wondering since the GPU really hates function pointers.

https://github.com/llvm/llvm-project/pull/98824


More information about the libc-commits mailing list