Home > Archive > Tcl > October 2005 > Procs, OO and memory
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Procs, OO and memory
|
|
| Silas Justiniano 2005-10-24, 3:58 am |
| Hello all!
I've seen Tcler's talking about procedures and memory in Tcl. AFAIK, a
proc is a string until the interpreter run it. Then it is transformed
to object code, right? I think it's not so good for large apps, because
it could take much of memory.
My question is about how the memory/proc problem is managed in OO
extensions. Are the classes strings until they are read to the
compiler? What about objects?
Thank you very much! Bye!
| |
| Arjen Markus 2005-10-24, 3:58 am |
| I do not think this is going to be a problem in practice: suppose you
have 1 MB of code (in string form), this might be compiled into several
MB of bytecode at the worst ... Given the memory of today's typical
computers, that is not a lot. You better worry about the _data_ your
program handles: if you have indeed 1 MB of code, it is rather like
that the program handles a lot more MBs of data.
Regards,
Arjen
| |
| suchenwi 2005-10-24, 3:58 am |
| Tcl is compiled, the first time needed, not into (hardware dependent)
object code, but into bytecodes for a virtual (platform-independent)
machine, and I'd expect the bytecode for given source code to be
considerably smaller in size.
But of course it pays, in every language, to reduce the complexity of
"large apps", even if it's less for memory reduction than for
maintainability.
|
|
|
|
|