Implementing something using as little foreign code as reasonably possible can actually be a good way to make it correct an secure.
You write it once and prove it's correct. After that, you're done, no matter how libraries around you change. If a library function gets a bug or gets slower, your code is unaffected. And your code likely won't get significantly slower as you update the compiler (it's more likely it will get faster).