3 ms·
Yes as it turns out malloc is much faster if free doesn’t exist.
by fermentation 6y ago
Yes as it turns out malloc is much faster if free doesn’t exist.
- saagarjha 6y agoNot just that: malloc is faster if you don’t have to care about thread safety, or support interposing, or hooks, or if security is not a concern. It is easy to “beat malloc” in a specific usecase if you know what it will be beforehand. Doing this in general is what is hard.