In this version of ft_printf, I coded without allocating memory with malloc. The execution speed of this version of ft_printf is about three times as fast as the version with malloc. It is almost as fast as the original printf.
My first version could not pass the automated tests in order to validate the project. So I decided to recode it from scratch and make it more efficient. I challenged myself to make a version of printf that did not allocate memory. You can read more about it in this blogpost.