Suppose I want only one (or a few) function from a certain header but it's a function I can define with the same efficiency as the library's implementation. Should I include a library header or implement my own function? Which is better?

I'm learning my first language C and I'm loving it.

**EDIT:**

Most of you didn't get the question. Forget about portability, and if it makes you happy "assume" that I can make a function with exactly the same efficiency. Or let's just say I've got the same implementation somehow.

I read somewhere that

> 
> The #include directive tells the preprocessor to open a specified file and insert its contents into the current file.
> 
> 
> 

The header like <stdlib.h> consists of many things so I wonder whether inserting all it's content to the file, or inserting a custom header with just what I want, which is more efficient in terms of speed or memory or program size?