Tech
A single malloc took 7 milliseconds. So I deleted the slow path.
Every allocator benchmark leads with the median. malloc does 15M ops/sec, the typical call is 15 ns, ship it.
The median never paged me at 3 a.m. The tail did.
Same allocator, same workload, but measuring the worst single call instead of the typical one:
Median: ~16 ns
Worst case: 6,950,000 ns — almost 7 milliseconds .
One malloc , occasionally, taking seven milliseconds. If you're rendering a frame in 16 ms or quoting a price in a market, that call just ate your e...
Read the full discussion on Dev.to
This article was aggregated from Dev.to. Click to join the conversation.
View on Dev.to