I was reading thought the System calls section in the Developers Handbook and at the chapter A.3.3, it is mentioned that the preferred calling convention should be the UNIX calling convention for a number of reasons (except you need Linux compatibility). The thing that interested me a lot was that the UNIX calling convention is faster. What does that "faster" mean? Faster to write, read, or "faster" as faster runtime? If the last is the case, then I cannot see why. If anything, I would expect the UNIX calling convention to be slower!
Based on my understanding, the UNIX calling convention pushes values on the stack so, it uses memory instead of registers. To add to that, the kernel will then have to read the memory and assign the values to the registers. On the other hand, the Microsoft® convention, directly adds the values to the registers, so there it eliminates the need to both read and write to memory.
So yeah, I'm kinda of a newbie to calling conventions (and to assembly in general) so I would appreciate it if anyone could explain that.
Based on my understanding, the UNIX calling convention pushes values on the stack so, it uses memory instead of registers. To add to that, the kernel will then have to read the memory and assign the values to the registers. On the other hand, the Microsoft® convention, directly adds the values to the registers, so there it eliminates the need to both read and write to memory.
So yeah, I'm kinda of a newbie to calling conventions (and to assembly in general) so I would appreciate it if anyone could explain that.