<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://robowiki.net/w/index.php?action=history&amp;feed=atom&amp;title=Code_Size%2FOld_discussion</id>
	<title>Code Size/Old discussion - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://robowiki.net/w/index.php?action=history&amp;feed=atom&amp;title=Code_Size%2FOld_discussion"/>
	<link rel="alternate" type="text/html" href="http://robowiki.net/w/index.php?title=Code_Size/Old_discussion&amp;action=history"/>
	<updated>2026-05-02T02:45:57Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.34.1</generator>
	<entry>
		<id>http://robowiki.net/w/index.php?title=Code_Size/Old_discussion&amp;diff=18037&amp;oldid=prev</id>
		<title>Voidious: remove category=Utilities</title>
		<link rel="alternate" type="text/html" href="http://robowiki.net/w/index.php?title=Code_Size/Old_discussion&amp;diff=18037&amp;oldid=prev"/>
		<updated>2011-01-06T19:35:51Z</updated>

		<summary type="html">&lt;p&gt;remove category=Utilities&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 19:35, 6 January 2011&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l224&quot; &gt;Line 224:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 224:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Discussions]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Discussions]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[Category:Utilities]]&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key wikidb:diff::1.12:old-16759:rev-18037 --&gt;
&lt;/table&gt;</summary>
		<author><name>Voidious</name></author>
		
	</entry>
	<entry>
		<id>http://robowiki.net/w/index.php?title=Code_Size/Old_discussion&amp;diff=16759&amp;oldid=prev</id>
		<title>RednaxelaBot: Using &lt;syntaxhighlight&gt;.</title>
		<link rel="alternate" type="text/html" href="http://robowiki.net/w/index.php?title=Code_Size/Old_discussion&amp;diff=16759&amp;oldid=prev"/>
		<updated>2010-07-01T08:22:59Z</updated>

		<summary type="html">&lt;p&gt;Using &amp;lt;syntaxhighlight&amp;gt;.&lt;/p&gt;
&lt;a href=&quot;http://robowiki.net/w/index.php?title=Code_Size/Old_discussion&amp;amp;diff=16759&amp;amp;oldid=14609&quot;&gt;Show changes&lt;/a&gt;</summary>
		<author><name>RednaxelaBot</name></author>
		
	</entry>
	<entry>
		<id>http://robowiki.net/w/index.php?title=Code_Size/Old_discussion&amp;diff=14609&amp;oldid=prev</id>
		<title>Miked0801: New trick</title>
		<link rel="alternate" type="text/html" href="http://robowiki.net/w/index.php?title=Code_Size/Old_discussion&amp;diff=14609&amp;oldid=prev"/>
		<updated>2010-01-22T08:27:34Z</updated>

		<summary type="html">&lt;p&gt;New trick&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 08:27, 22 January 2010&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l220&quot; &gt;Line 220:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 220:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;--[[User:Starrynte|Starrynte]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;--[[User:Starrynte|Starrynte]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;A new trick - using Math.toRadians() or Math.toDegrees() is 1 byte smaller than the coorisponding multiply or divide by 180/Pi. I used this to get back 3 bytes recently where I was scaling an integer by an arbitrary number.  If I make the number 180/Pi, I get the byte back.  I've also found that 2f occasionally is smaller than 2d in equations and that 3,4,5 as doubles don't seem to save any space like they should.  --[[User:Miked0801|Miked0801]] 08:27, 22 January 2010 (UTC) &lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Discussions]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Discussions]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Utilities]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Utilities]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key wikidb:diff::1.12:old-7296:rev-14609 --&gt;
&lt;/table&gt;</summary>
		<author><name>Miked0801</name></author>
		
	</entry>
	<entry>
		<id>http://robowiki.net/w/index.php?title=Code_Size/Old_discussion&amp;diff=7296&amp;oldid=prev</id>
		<title>Robobot: Robobot 0.1 : correcting user page links</title>
		<link rel="alternate" type="text/html" href="http://robowiki.net/w/index.php?title=Code_Size/Old_discussion&amp;diff=7296&amp;oldid=prev"/>
		<updated>2009-05-22T07:48:18Z</updated>

		<summary type="html">&lt;p&gt;&lt;a href=&quot;/wiki/User:Robobot&quot; title=&quot;User:Robobot&quot;&gt;Robobot&lt;/a&gt; 0.1 : correcting user page links&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 07:48, 22 May 2009&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l6&quot; &gt;Line 6:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 6:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Static variables take less space than non-static ones.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Static variables take less space than non-static ones.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;** [[Starrynte]] adds: They save 5 bytes to be exact&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;** [[&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;User:Starrynte|&lt;/ins&gt;Starrynte]] adds: They save 5 bytes to be exact&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Don't initialize your number variables to zero - they're zero by default (thanks to the Java Spec)&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Don't initialize your number variables to zero - they're zero by default (thanks to the Java Spec)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &amp;lt;code&amp;gt; try{ ... } catch &amp;lt;/code&amp;gt; is a great way to save space. For example,&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &amp;lt;code&amp;gt; try{ ... } catch &amp;lt;/code&amp;gt; is a great way to save space. For example,&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l119&quot; &gt;Line 119:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 119:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;     rawr[2][4] = 10;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;     rawr[2][4] = 10;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;-- [[Chase-san]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;-- [[&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;User:Chase-san|&lt;/ins&gt;Chase-san]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;I would guess that they compile to the exact same thing, so there would be no gain there. -- [[Voidious]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;I would guess that they compile to the exact same thing, so there would be no gain there. -- [[&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;User:Voidious|&lt;/ins&gt;Voidious]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;It is universally true (in the Java universe) that uninitialized variables are 0, false, or null. -- [[Simonton]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;It is universally true (in the Java universe) that uninitialized variables are 0, false, or null. -- [[&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;User:Simonton|&lt;/ins&gt;Simonton]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;First of all. Cool page, and which is a great inspiration. -- [[Fnl]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;First of all. Cool page, and which is a great inspiration. -- [[Fnl]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l142&quot; &gt;Line 142:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 142:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;At least it should have a faster execution time! ;-) --[[Fnl]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;At least it should have a faster execution time! ;-) --[[Fnl]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Yes, you are right.  Smaller still would be &amp;lt;tt&amp;gt;int i = (int) Math.signum(2 - j)&amp;lt;/tt&amp;gt;, if you could afford the situation that i comes out to be zero.  Or, for one extra byte (still smaller, though), you can almost always afford a rare, rare situation that something like &amp;lt;tt&amp;gt;int i = (int) Math.signum(2.00000000000001 - j)&amp;lt;/tt&amp;gt; would come out to zero. -- [[Simonton]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Yes, you are right.  Smaller still would be &amp;lt;tt&amp;gt;int i = (int) Math.signum(2 - j)&amp;lt;/tt&amp;gt;, if you could afford the situation that i comes out to be zero.  Or, for one extra byte (still smaller, though), you can almost always afford a rare, rare situation that something like &amp;lt;tt&amp;gt;int i = (int) Math.signum(2.00000000000001 - j)&amp;lt;/tt&amp;gt; would come out to zero. -- [[&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;User:Simonton|&lt;/ins&gt;Simonton]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Hehe..&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Hehe..&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l166&quot; &gt;Line 166:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 166:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;I know there is another page around here I've posted on before about this - one I started a long time ago.  I also know there is a lost thread over at the Repository than had similiar info.  I wonder if that could be recovered.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;I know there is another page around here I've posted on before about this - one I started a long time ago.  I also know there is a lost thread over at the Repository than had similiar info.  I wonder if that could be recovered.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;--[[Miked0801]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;--[[&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;User:Miked0801|&lt;/ins&gt;Miked0801]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* I'm interested by your &amp;quot;number swapping&amp;quot; trick.  Can you give an example of when this is useful?  Thanks! -- [[Simonton]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* I'm interested by your &amp;quot;number swapping&amp;quot; trick.  Can you give an example of when this is useful?  Thanks! -- [[&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;User:Simonton|&lt;/ins&gt;Simonton]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;** I've used it to multi-mode between 2 movement amounts - say you do better with small movements against some and large against others, xor  between the 2 values on OnDeath or whatever.  I believe the current Moebius uses this.  It also works for swapping between non similiar positive and negative numbers as well.  You can imagine where that could be useful.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;** I've used it to multi-mode between 2 movement amounts - say you do better with small movements against some and large against others, xor  between the 2 values on OnDeath or whatever.  I believe the current Moebius uses this.  It also works for swapping between non similiar positive and negative numbers as well.  You can imagine where that could be useful.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l197&quot; &gt;Line 197:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 197:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;}&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;In other words it appears that factory methods are smaller than constructors if used 3 or more times. They are the same size if used twice, but are larger if the constructor is only used once. -- [[Rednaxela]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;In other words it appears that factory methods are smaller than constructors if used 3 or more times. They are the same size if used twice, but are larger if the constructor is only used once. -- [[&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;User:Rednaxela|&lt;/ins&gt;Rednaxela]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Lol, &amp;lt;code&amp;gt;double bulletPower = 3/2;&amp;lt;/code&amp;gt; uses up less space than &amp;lt;code&amp;gt;double bulletPower = 1.5;&amp;lt;/code&amp;gt; (2 bytes(?) to be exact) --[[Starrynte]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Lol, &amp;lt;code&amp;gt;double bulletPower = 3/2;&amp;lt;/code&amp;gt; uses up less space than &amp;lt;code&amp;gt;double bulletPower = 1.5;&amp;lt;/code&amp;gt; (2 bytes(?) to be exact) --[[&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;User:Starrynte|&lt;/ins&gt;Starrynte]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;That would be because 3/2 is integer arithmetic.... essentially equivalent to 1. Try putting 1.0 in there, it should be the same =) -- [[Skilgannon]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;That would be because 3/2 is integer arithmetic.... essentially equivalent to 1. Try putting 1.0 in there, it should be the same =) -- [[&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;User:Skilgannon|&lt;/ins&gt;Skilgannon]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;In a method,&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;In a method,&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l219&quot; &gt;Line 219:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 219:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;}&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;--[[Starrynte]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;--[[&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;User:Starrynte|&lt;/ins&gt;Starrynte]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Discussions]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Discussions]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Utilities]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Utilities]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key wikidb:diff::1.12:old-5883:rev-7296 --&gt;
&lt;/table&gt;</summary>
		<author><name>Robobot</name></author>
		
	</entry>
	<entry>
		<id>http://robowiki.net/w/index.php?title=Code_Size/Old_discussion&amp;diff=5883&amp;oldid=prev</id>
		<title>Nat: CodeSize/Old discussion moved to Code Size/Old discussion</title>
		<link rel="alternate" type="text/html" href="http://robowiki.net/w/index.php?title=Code_Size/Old_discussion&amp;diff=5883&amp;oldid=prev"/>
		<updated>2009-05-01T08:11:58Z</updated>

		<summary type="html">&lt;p&gt;&lt;a href=&quot;/wiki/CodeSize/Old_discussion&quot; class=&quot;mw-redirect&quot; title=&quot;CodeSize/Old discussion&quot;&gt;CodeSize/Old discussion&lt;/a&gt; moved to &lt;a href=&quot;/wiki/Code_Size/Old_discussion&quot; title=&quot;Code Size/Old discussion&quot;&gt;Code Size/Old discussion&lt;/a&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 08:11, 1 May 2009&lt;/td&gt;
				&lt;/tr&gt;
&lt;!-- diff cache key wikidb:diff::1.12:old-4623:rev-5883 --&gt;
&lt;/table&gt;</summary>
		<author><name>Nat</name></author>
		
	</entry>
	<entry>
		<id>http://robowiki.net/w/index.php?title=Code_Size/Old_discussion&amp;diff=4623&amp;oldid=prev</id>
		<title>Robar: added categories</title>
		<link rel="alternate" type="text/html" href="http://robowiki.net/w/index.php?title=Code_Size/Old_discussion&amp;diff=4623&amp;oldid=prev"/>
		<updated>2009-03-20T17:39:33Z</updated>

		<summary type="html">&lt;p&gt;added categories&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 17:39, 20 March 2009&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l220&quot; &gt;Line 220:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 220:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;--[[Starrynte]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;--[[Starrynte]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[Category:Discussions]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[Category:Utilities]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key wikidb:diff::1.12:old-4621:rev-4623 --&gt;
&lt;/table&gt;</summary>
		<author><name>Robar</name></author>
		
	</entry>
	<entry>
		<id>http://robowiki.net/w/index.php?title=Code_Size/Old_discussion&amp;diff=4621&amp;oldid=prev</id>
		<title>Robar: old codesize discussion migrated</title>
		<link rel="alternate" type="text/html" href="http://robowiki.net/w/index.php?title=Code_Size/Old_discussion&amp;diff=4621&amp;oldid=prev"/>
		<updated>2009-03-20T17:36:40Z</updated>

		<summary type="html">&lt;p&gt;old codesize discussion migrated&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;The tips on this page are specific ways you can rewrite your code to use fewer bytes, as measured by the CodeSize utility. Please note that CodeSize is not affected by the length of your method or variable names.&lt;br /&gt;
&lt;br /&gt;
Discussion is at the bottom of this page.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
* Static variables take less space than non-static ones.&lt;br /&gt;
** [[Starrynte]] adds: They save 5 bytes to be exact&lt;br /&gt;
* Don't initialize your number variables to zero - they're zero by default (thanks to the Java Spec)&lt;br /&gt;
* &amp;lt;code&amp;gt; try{ ... } catch &amp;lt;/code&amp;gt; is a great way to save space. For example,&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
            LinkedList list;&lt;br /&gt;
            try{&lt;br /&gt;
                someFunction(list.getFirst());&lt;br /&gt;
            } catch(Exception ex){}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
:is smaller than:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
            LinkedList list;&lt;br /&gt;
            if(list.size() != 0){&lt;br /&gt;
                someFunction(list.getFirst());&lt;br /&gt;
            }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Any time you are &amp;quot;doing the same thing&amp;quot; in more than one place, try to find a way to condense it into a method and call it in each place. In some situations, this may seem obvious, but in others it is less obvious. A line from [[Komarious]] that makes use of a sign(double d) method where you wouldn't normally expect one:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
            _goAngle = angleFromWaveSource +&lt;br /&gt;
                directedGoAngle(direction = (sign(checkDanger(-1) - checkDanger(1))));&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* &amp;lt;nowiki&amp;gt;Another somewhat similar situation: there are four places in Komarious that call wave.sourceLocation.distance(someOtherPoint). Creating a distanceToPoint(Point2D) method in the Wave class, and replacing those four calls with wave.distanceToPoint(someOtherPoint) ends up saving 3 bytes; you are getting rid of 4 references to sourceLocation in your code, but adding the size of the method itself.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
* Local variables cost less to reference than static ones, so it may pay to create one just to hold a static variable's value for the duration of a method.&lt;br /&gt;
* I think I saw this somewhere else on the wiki, but:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
            int i = 1;&lt;br /&gt;
            if (j &amp;gt; 2) {&lt;br /&gt;
                i = -1;&lt;br /&gt;
            }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
:is smaller than&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
            int i;&lt;br /&gt;
            if (j &amp;gt; 2) {&lt;br /&gt;
                i = -1;&lt;br /&gt;
            } else {&lt;br /&gt;
                i = 1;&lt;br /&gt;
            }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* ''Sometimes''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
            double a;&lt;br /&gt;
            double t = (a = e.getBearing()) * getEnergy();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
:is smaller than&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
            double a = e.getBearing();&lt;br /&gt;
            double t = a * getEnergy();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* If you can afford the loss of precision, integers are smaller than doubles.&lt;br /&gt;
* &amp;lt;tt&amp;gt;String.valueOf(x).concat(&amp;quot; is my number&amp;quot;)&amp;lt;/tt&amp;gt; is WAY smaller than &amp;lt;tt&amp;gt;x + &amp;quot; is my number&amp;quot;&amp;lt;/tt&amp;gt;.  The compiler turns the latter into something like:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
            StringBuilder s = new StringBuilder();&lt;br /&gt;
            s.append(x);&lt;br /&gt;
            s.append(&amp;quot; is my number&amp;quot;);&lt;br /&gt;
            s.toString();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* The integer literals in the range &amp;lt;tt&amp;gt;[-1, 5]&amp;lt;/tt&amp;gt; are one unit (byte?) smaller than the others in the range &amp;lt;tt&amp;gt;[-128, 127]&amp;lt;/tt&amp;gt;, which are one byte smaller than the others in the range [-32768, 32767], which are one byte bigger than the other integers.&lt;br /&gt;
* Be careful about promotion in your arithemic.  &amp;lt;tt&amp;gt;some_int + some_int + some_double&amp;lt;/tt&amp;gt; (add two integers, promote the result to a double, add two doubles) is smaller than &amp;lt;tt&amp;gt;some_int1 + some_double + some_int2&amp;lt;/tt&amp;gt; (promote some_int_1 to a double, add two doubles, promote some_int_2 to a double, add to doubles).&lt;br /&gt;
* The double literals &amp;lt;tt&amp;gt;0, 1&amp;lt;/tt&amp;gt; are one byte smaller than &amp;lt;tt&amp;gt;-1, 2, 3, 4, 5&amp;lt;/tt&amp;gt;, which are one byte smaller than the rest of the doubles (including those in between the numbers listed).&lt;br /&gt;
* &amp;lt;tt&amp;gt;if (some_int == 0)&amp;lt;/tt&amp;gt; is smaller than &amp;lt;tt&amp;gt;if (some_int == 1)&amp;lt;/tt&amp;gt;, but the same size as &amp;lt;tt&amp;gt;if (some_boolean)&amp;lt;/tt&amp;gt;.&lt;br /&gt;
* Declaration and initialization of static final fields are free, as long as they don't require any method calls.  They are like macros that insert literals into your code.&lt;br /&gt;
* Arithmetic, casting and string concatenation of literals are free.&lt;br /&gt;
* Be careful with the above rule: &amp;lt;tt&amp;gt;x + 1 + 2&amp;lt;/tt&amp;gt; does not count, you must do &amp;lt;tt&amp;gt;x + (1 + 2)&amp;lt;/tt&amp;gt;.&lt;br /&gt;
* You pay for the default constructor of a class even if you don't write the empty code for it yourself, so if you have something useful to put there, go ahead and put it there.&lt;br /&gt;
* If you initialize any static variables (that are not final), you pay one extra byte, so if you aren't saving *any* data between battles, initialize your variables in the run method or in your constructor (which you are paying for whether you want to or not).&lt;br /&gt;
* The first 4 variables in a method represent registers, the rest represent places in memory.  I discovered this over the weekend.  I now name my first 4 variables r1i (an integer), r2d (a double), r4p (a Point2D.Double) etc.  USE THIS FACT.  All operations must work from registers, and every load from memory into a register requires an operation, as does storing from a register back to memory.  By using your first 4 variables wisely, you can save yourself a lot of load &amp;amp; store operations (which each cost you in CodeSize).  Some more notes:&lt;br /&gt;
** The first variable passed to a non-static method is &amp;quot;this&amp;quot;.  It uses your first register.&lt;br /&gt;
** The next variables declared in your method are the parameters.  They use your next registers.&lt;br /&gt;
** All types except double use up 1 register, doubles use 2 (thus the name, &amp;quot;double&amp;quot;).&lt;br /&gt;
** You can declare a double as your 4th register (which would overflow to your 5th register), and magically it still works.&lt;br /&gt;
&lt;br /&gt;
Please add to this table as you can, and organize it if you like: ''(Need to make table from it! Old wiki has slightly different code..)''&lt;br /&gt;
&lt;br /&gt;
*| '''Operation'''                          |  '''Cost in CodeSize'''&lt;br /&gt;
*| 1st constructor                          |  free&lt;br /&gt;
*| creating a method                        |  free&lt;br /&gt;
*| returning from a method                  |  1&lt;br /&gt;
*| calling a method                         |  3&lt;br /&gt;
*| storing a local (non-register) variable  |  1&lt;br /&gt;
*| loading a local (non-register) variable  |  1&lt;br /&gt;
*| storing a static variable                |  2&lt;br /&gt;
*| loading a static variable                |  2&lt;br /&gt;
*| loading integer literals -1 to 5         |  1&lt;br /&gt;
*| loading integer literals -128 to 127     |  2&lt;br /&gt;
*| loading integer literals -32768 to 32767 |  3&lt;br /&gt;
*| loading other integer literals           |  2&lt;br /&gt;
*| loading double literals 0, 1             |  1&lt;br /&gt;
*| loading double literals -1, 2, 3, 4, 5   |  2&lt;br /&gt;
*| loading other double literals            |  3&lt;br /&gt;
*| loading string literals                  |  2&lt;br /&gt;
*| declaring a variable                     |  free&lt;br /&gt;
*| casting                                  |  1&lt;br /&gt;
*| promotion                                |  1&lt;br /&gt;
*| arithmetic                               |  1&lt;br /&gt;
*| ++ and -- (register or not)              |  1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
'''Discussion'''&lt;br /&gt;
&lt;br /&gt;
What about using ternaries? So like in your example:&lt;br /&gt;
Is&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
double rawr[] = new double[12];&lt;br /&gt;
rawr[2][4] = (rawr[].length &amp;gt; 0) ? 10 : rawr[2][4];&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Smaller then&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
double rawr[] = new double[12];&lt;br /&gt;
if(rawr[].length &amp;gt; 0)&lt;br /&gt;
    rawr[2][4] = 10;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
-- [[Chase-san]]&lt;br /&gt;
&lt;br /&gt;
I would guess that they compile to the exact same thing, so there would be no gain there. -- [[Voidious]]&lt;br /&gt;
&lt;br /&gt;
It is universally true (in the Java universe) that uninitialized variables are 0, false, or null. -- [[Simonton]]&lt;br /&gt;
&lt;br /&gt;
First of all. Cool page, and which is a great inspiration. -- [[Fnl]]&lt;br /&gt;
&lt;br /&gt;
I am wondering if:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
            int i;&lt;br /&gt;
            if (j &amp;gt; 2) {&lt;br /&gt;
                i = -1;&lt;br /&gt;
            } else {&lt;br /&gt;
                i = 1;&lt;br /&gt;
            }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Could be written even smaller:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
            int i = (j &amp;gt; 2) ? -1 : 1;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
At least it should have a faster execution time! ;-) --[[Fnl]]&lt;br /&gt;
&lt;br /&gt;
* Yes, you are right.  Smaller still would be &amp;lt;tt&amp;gt;int i = (int) Math.signum(2 - j)&amp;lt;/tt&amp;gt;, if you could afford the situation that i comes out to be zero.  Or, for one extra byte (still smaller, though), you can almost always afford a rare, rare situation that something like &amp;lt;tt&amp;gt;int i = (int) Math.signum(2.00000000000001 - j)&amp;lt;/tt&amp;gt; would come out to zero. -- [[Simonton]]&lt;br /&gt;
&lt;br /&gt;
Hehe..&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
            LinkedList list;&lt;br /&gt;
            try{&lt;br /&gt;
                someFunction(list.getFirst());&lt;br /&gt;
            } catch(Exception ex){}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
..is smaller, but more expensive in execution time due to the try-catch! ;-) --[[Fnl]]&lt;br /&gt;
&lt;br /&gt;
A few of my tricks.  Remember your binary operators &amp;amp;, |, and especially ^ (xor).  Xor is great for swapping very cheaply between 2 integer numbers for next to nothing:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
            variable = 64;&lt;br /&gt;
...&lt;br /&gt;
            variable ^= 32;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
is a very cheap way to swap between 64 and 96.  Just be careful of the binary math :)&lt;br /&gt;
&lt;br /&gt;
It is almost always cheaper to directly call a method that has 2 or more lines of code than to repeat the code.  I've manually called OnDeath(null) before to reinitialize variables and such.&lt;br /&gt;
&lt;br /&gt;
In the spirit of smaller numbers, it is cheaper to divide by 5 than to multiply my 0.2.  Same for any other operator.&lt;br /&gt;
&lt;br /&gt;
I know there is another page around here I've posted on before about this - one I started a long time ago.  I also know there is a lost thread over at the Repository than had similiar info.  I wonder if that could be recovered.&lt;br /&gt;
--[[Miked0801]]&lt;br /&gt;
&lt;br /&gt;
* I'm interested by your &amp;quot;number swapping&amp;quot; trick.  Can you give an example of when this is useful?  Thanks! -- [[Simonton]]&lt;br /&gt;
** I've used it to multi-mode between 2 movement amounts - say you do better with small movements against some and large against others, xor  between the 2 values on OnDeath or whatever.  I believe the current Moebius uses this.  It also works for swapping between non similiar positive and negative numbers as well.  You can imagine where that could be useful.&lt;br /&gt;
&lt;br /&gt;
Well, here's one little trick I found that I thought I'd share. At least with Java 6 compiling in Java 5 compatibility mode (I haven't tested other configurations), the following:&lt;br /&gt;
&amp;lt;pre&amp;gt;public class Foo {&lt;br /&gt;
    public Foo() {}&lt;br /&gt;
&lt;br /&gt;
    public static final Foo getOne() {&lt;br /&gt;
        return new Foo();&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
def void doStuff() {&lt;br /&gt;
    Foo a = Foo.getOne();&lt;br /&gt;
    Foo b = Foo.getOne();&lt;br /&gt;
    Foo c = Foo.getOne();&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
is smaller than:&lt;br /&gt;
&amp;lt;pre&amp;gt;public class Foo {&lt;br /&gt;
    public Foo() {}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
def void doStuff() {&lt;br /&gt;
    Foo a = new Foo();&lt;br /&gt;
    Foo b = new Foo();&lt;br /&gt;
    Foo c = new Foo();&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In other words it appears that factory methods are smaller than constructors if used 3 or more times. They are the same size if used twice, but are larger if the constructor is only used once. -- [[Rednaxela]]&lt;br /&gt;
&lt;br /&gt;
Lol, &amp;lt;code&amp;gt;double bulletPower = 3/2;&amp;lt;/code&amp;gt; uses up less space than &amp;lt;code&amp;gt;double bulletPower = 1.5;&amp;lt;/code&amp;gt; (2 bytes(?) to be exact) --[[Starrynte]]&lt;br /&gt;
&lt;br /&gt;
That would be because 3/2 is integer arithmetic.... essentially equivalent to 1. Try putting 1.0 in there, it should be the same =) -- [[Skilgannon]]&lt;br /&gt;
&lt;br /&gt;
In a method,&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if(condition){&lt;br /&gt;
   foo1();&lt;br /&gt;
   return;&lt;br /&gt;
}&lt;br /&gt;
foo2();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
is 2 bytes smaller than&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if(condition){&lt;br /&gt;
    foo1();&lt;br /&gt;
}else{&lt;br /&gt;
    foo2();&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
--[[Starrynte]]&lt;/div&gt;</summary>
		<author><name>Robar</name></author>
		
	</entry>
</feed>