| ▲ | mort96 6 hours ago | ||||||||||||||||
The way most programs achieve being fast is by re-using allocations. You don't need a fast allocator if you don't allocate. Nothing of what ripgrep does inherently requires frequent allocations. | |||||||||||||||||
| ▲ | entrope 3 hours ago | parent [-] | ||||||||||||||||
The ISO C definition of opendir() requires an allocation in practice because it returns a DIR* and it's bad practice for the library to arbitrarily limit how many of those an application has at a time. Maybe a C library could preallocate several DIRs and only use the heap when those are exhausted, but this ripgrep use case (lots of threads running in parallel on a large tree) would still be likely to trigger that. | |||||||||||||||||
| |||||||||||||||||