From mboxrd@z Thu Jan 1 00:00:00 1970 From: jnc@mercury.lcs.mit.edu (Noel Chiappa) Date: Mon, 4 Jan 2016 07:53:10 -0500 (EST) Subject: [TUHS] Early Unix function calls: expensive? Message-ID: <20160104125310.9379718C0A1@mercury.lcs.mit.edu> > that's 28+13 = 41 memory cycles. > ... > purely in overhead (counting putting the args on the stack as overhead). Oh, I missed an instruction for de-stacking the arguments, which was typically something like 'add #N, sp', so another two instruction word fetches, or 43 cycles. Ironically, if N=4, the compiler used to emit a 'cmp (sp)+, (sp)+', which is more efficient space-wise (one word instead of two), but less time-wise (3 cycles instead of 2). Noel