Path: utzoo!attcan!uunet!husc6!bloom-beacon!mit-eddie!killer!pollux!dalsqnt!rpp386!jfh From: jfh@rpp386.UUCP (John F. Haugh II) Newsgroups: comp.lang.c Subject: Re: Variable argument lists. Summary: performance questions. Message-ID: <1740@rpp386.UUCP> Date: 14 May 88 05:31:29 GMT References: <14139@brl-adm.ARPA> <7864@alice.UUCP> Reply-To: jfh@rpp386.UUCP (The Beach Bum) Organization: Big "D" Home for Wayward Hackers Lines: 26 In article <7864@alice.UUCP> ark@alice.UUCP writes: >In article <14139@brl-adm.ARPA>, bates%falcon.dnet%fermat@bru.mayo.edu writes: > >> Does anybody know (or care) why in ANSI standard C when >> using a variable length argument list, there is no way to >> determine how many arguments where passed into the function? > >Such a facility is hard to implement in some >machine architectures without significantly slowing down >every function call, even those that don't use it. the addition of an extra instruction to stack the number of arguments can hardly be considered significantly slowing down a function call. this sounds like the anti-recursion argument IBM is so fond of - `but stacking all those variables is SO expensive' ... the addition of one more instruction (or two or three or whatever for really deficient hardware) to provide such a useful function would seem like A Good Thing. - john. -- John F. Haugh II | "You see, I want a lot. Perhaps I want every River Parishes Programming | -thing. The darkness that comes with every UUCP: ihnp4!killer!rpp386!jfh | infinite fall and the shivering blaze of DOMAIN: jfh@rpp386 | every step up ..." -- Rainer Maria Rilke