库函数是语言或应用程序的一部分,可以运行在用户空间中,而系统调用是操作系统的一部分,是内核为用户提供的程序接口,运行在内核空间中,而且许多库函数都会使用系统调用来实现功能。
Library function is a part of language or application program, which can run in user space. System call is a part of operating system and is the program interface provided by kernel for users. It runs in kernel space, and many library functions will use system call to realize functions.

未使用系统调用的库函数,其执行效率通常要比系统调用的高,因为使用系统调用时,需要上下文的切换以及状态的切换(由用户态转为内核态)。
The execution efficiency of library functions without system calls is usually higher than that of system calls, because context switching and state switching (from user mode to kernel mode) are required when system calls are used.