Linked by Thom Holwerda on Fri 25th Aug 2006 09:03 UTC, submitted by anonymous
Thread beginning with comment 155965
To view parent comment, click here.
To read all comments associated with this story, please click here.
To view parent comment, click here.
To read all comments associated with this story, please click here.





Member since:
2005-07-06
An interpreted language can be very memory efficient, since you can reduce high level operations to a single byte.
Simple example:
PRINT "THIS IS A STRING"
the PRINT gets turned into a token, say 0x25, followed by a 0x10 byte (16, string length) then the characters of the string.
LD HL, STRING_LABEL
JSR PRINT
The interpreter has a 1 byte overhead above the actual data space, whereas in assembly you have a 6 byte overhead.
For a single print statement, the rest of the interpreter is overkill. But for large programs, since the interpreter is a static cost, the cost of the interpreter becomes less and less in terms of the overall size cost of the program.
Not to mention any actual productivity benefits.
No, typically the cost of an interpreter has always been performance, not size.