Open main menu

Difference between revisions of "AGIWiki/Managing resources"

m
Text replacement - "</source>" to "</syntaxhighlight>"
m (syntax -> source)
m (Text replacement - "</source>" to "</syntaxhighlight>")
Line 33: Line 33:
print("I do not know whether or not he will come.");
print("I do not know whether or not he will come.");
print("I didn't actually do that in reality.");
print("I didn't actually do that in reality.");
</source>
</syntaxhighlight>


The above two print commands are wasting memory! They use far too many characters to say what they're trying to say. Compare to these far better versions:
The above two print commands are wasting memory! They use far too many characters to say what they're trying to say. Compare to these far better versions:
Line 41: Line 41:
print("I didn't do that."); // OR
print("I didn't do that."); // OR
print("I didn't really do that.");
print("I didn't really do that.");
</source>
</syntaxhighlight>


The sentence ''I don't know whether he'll come.'' is 10 bytes less memory than ''I do not know whether or not he will come.'' and it says the same thing. Similarly, ''I didn't do that.'' is 20 bytes less memory than ''I didn't actually do that in reality.''
The sentence ''I don't know whether he'll come.'' is 10 bytes less memory than ''I do not know whether or not he will come.'' and it says the same thing. Similarly, ''I didn't do that.'' is 20 bytes less memory than ''I didn't actually do that in reality.''
TrustedUser
2,147

edits