-1

Is it actually important for a programmer to know if the standard library function he/she is using is actually executing a system call? If so, why?

Intuitively I'm guessing the only importance is in knowing if the general standard function is a library function or a system call itself. In other cases, I'm guessing there isn't much of a need to know if a library functions uses internally a system call?

Jon Gan
  • 101

2 Answers2

2

As a programmer you should be interested in what the function call does, not how it is done. Sure, one can be curious about such things. But if a particular function does (or could) invoke a system call or not is very much system-dependent.

vonbrand
  • 18,253
0

I can only think of two situations in which you might need to care about what the library function is doing:

  1. You discovered a bug in the function, and you verified this via some test cases.

  2. The function is causing you performance problems, and you verified this via appropriate profiling.

As a general rule, though, it doesn't really matter what the library is doing, so long as it isn't causing you any trouble.