I came up with project to create a libc++ library using tbbmalloc instead of default allocator on macOS, if I think right, it should result in a bit faster and saner memory-wise libc++. I'm not sure how to do that, I can imagine that linking tbbmalloc statically won't do that so I ask for help to achieve this.
Not saying it's not working, but DYLD_INSERT_LIBRARIES is skipped with SIP enabled on El Captain+ if I'm not missing something and I'm looking for a more system solution.
Vladimir is right that replacing the memory manager for particular applications of interest (instead of the standard library) is generally a preferred approach.
If you nevertheless wish to make libc++ use tbbmalloc internally, perhaps you should first get some advice from the libc++ community about how to replace malloc with any other memory manager when building libc++.