#: 5801 S15/Hot Topics
03-Aug-90 17:50:41
Sb: #5795-#Is Basic out of date?
Fm: Pete Lyall 76703,4230
To: MOTD Editor..Bill Brady 70126,267 (X)
Bill -
The initial startup code runs 3-5K. Subsequent to that, the first use of a new
function adds ?.?k bytes as a one time cost. Since the adoption of the Kreider
Libraries, that cost has been reduced, as functions are written as economically
as possible in RMA.
I don't want to turn this into a contest, but adding 3k to an executable per
"change in the source" is probably not a supportable statement, at least not as
a freestanding generalization. If you had no code, then added 'printf()' to it,
you'd incur a 3-5K penalty.... one time. Likewise with another complex function
(like 'scanf()')... but again, only one time. Most functions are not NEARLY
that expensive, and only penalize you on their first use (subsequent uses are
effectively free, barring the stack frame setup and jsr
instructions.)
My point is not that C is better than B09 (although B09 will cost you 12K
minimum, for Runb), nor vice versa. My point is simply that C isn't as unruly
as you suggest in terms of memory usage.
Pete
P.S. Can you tell I've been on jury duty all week?
There are 2 Replies.
|