Walter Roberson said:
Sounds to me like you have not considered Kolmogorov complexity in
this matter. Some functions are inherently complex, and cannot be
written smally except each in some language tailor-made to express
that one function smally.
Kolmogorov complexity is the complexity of A given B as the input. In this
case B is the operating system / platform / whatever. B is deliberately
designed to reduce the Kolmogorov complexity of as many functions as
possible. So it's not a good measure. Sometimes printf() is one call to a
library outside of the program, sometimes an expansion of the format string
followed by a call for each character, sometimes it decodes glyphs and
accesses the screen raster.
Invoking a routine is a form of manipulating memory.
If you want to have textual case distinguish object size, then
you need to be consistant and have large functions distinguished by
uppercase, as reminders that they are space-expensive to invoke.
They take memory space to link and memory space to invoke. You're running
the two things together here.
We could have a leading / trailing _M system.
_M_Mprintf_M
indicates that it is relatively hefty to link in, but only moderately
memory-greedy to invoke.
_M_M_M_M_malloc()
however is extremely memory heavy to link in, since it uses a huge
allocation pool, but the overhead on invocation is fairly tiny.
printf() is a good traditional example: an integer-only program
that invokes printf() must be linked with the floating point library
(if there is a seperate floating point library) because printf()
needs floating point linked it case the user specified a floating
point formating element. It was not uncommon in the earlier days
for an integer-only program to be a fairly small number of Kb but
to kick up by several hundred Kb because printf() was referenced.
That is a danger for embedded programs.