context switches / syscalls cost a lot of cycles to save and reload cpu context. you basically need to push all stuff to memory related to context, registers, flags, stack pointers et.c etc., then load the ones for kernel space, perform some call, and switch back. This means a lot of overhead is saved, especially for small functions.
https://wiki.osdev.org/Context_Switching