<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://wiki.kram.nz/index.php?action=history&amp;feed=atom&amp;title=SE250%3Alab-1%3Ajsmi233</id>
	<title>SE250:lab-1:jsmi233 - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.kram.nz/index.php?action=history&amp;feed=atom&amp;title=SE250%3Alab-1%3Ajsmi233"/>
	<link rel="alternate" type="text/html" href="https://wiki.kram.nz/index.php?title=SE250:lab-1:jsmi233&amp;action=history"/>
	<updated>2026-04-28T18:49:38Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.45.3</generator>
	<entry>
		<id>https://wiki.kram.nz/index.php?title=SE250:lab-1:jsmi233&amp;diff=4358&amp;oldid=prev</id>
		<title>Mark: 9 revision(s)</title>
		<link rel="alternate" type="text/html" href="https://wiki.kram.nz/index.php?title=SE250:lab-1:jsmi233&amp;diff=4358&amp;oldid=prev"/>
		<updated>2008-11-03T05:18:42Z</updated>

		<summary type="html">&lt;p&gt;9 revision(s)&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== Method ==&lt;br /&gt;
&lt;br /&gt;
At first I tried using an addition without assignment (ie num1 + num2) but this didn&amp;#039;t seem to do anything, so I included an assignment (ie result = num1 + num2) and included a constant assignment in the &amp;quot;empty&amp;quot; for loop.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here is a description of what my code does.&lt;br /&gt;
All repetitions are achieved using for loops.&lt;br /&gt;
&lt;br /&gt;
(1) Perform an assignment n times&lt;br /&gt;
&lt;br /&gt;
(2) Perform an addition (including assignment) n times&lt;br /&gt;
&lt;br /&gt;
(3) Subtract time taken for (1) from the time taken for (2)&lt;br /&gt;
&lt;br /&gt;
(4) Repeat this five times and take an average&lt;br /&gt;
&lt;br /&gt;
== Results ==&lt;br /&gt;
&lt;br /&gt;
These are just one set of results. In total, I had many varied results.&lt;br /&gt;
All times are for a single addition in nanoseconds.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
INT&lt;br /&gt;
&lt;br /&gt;
Looping 10^8 times: 0.23&lt;br /&gt;
&lt;br /&gt;
Looping 10^9 times: 0.097&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
LONG&lt;br /&gt;
&lt;br /&gt;
Looping 10^8 times: 0.01&lt;br /&gt;
&lt;br /&gt;
Looping 10^9 times: 0.03&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
SHORT&lt;br /&gt;
&lt;br /&gt;
Looping 10^8 times: 0.49&lt;br /&gt;
&lt;br /&gt;
Looping 10^9 times: 0.428&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
FLOAT&lt;br /&gt;
&lt;br /&gt;
Looping 10^8 times: 0.08&lt;br /&gt;
&lt;br /&gt;
Looping 10^9 times: 0.02&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
DOUBLE&lt;br /&gt;
&lt;br /&gt;
Looping 10^8 times: 0.08&lt;br /&gt;
&lt;br /&gt;
Looping 10^9 times: 0.053&lt;br /&gt;
&lt;br /&gt;
== Thoughts ==&lt;br /&gt;
&lt;br /&gt;
It seems that all the types perform addition in about the same time. Why? It might be because I only added small values.&lt;br /&gt;
&lt;br /&gt;
The exception to this is type short. This type seemed to take significantly longer. Why?&lt;/div&gt;</summary>
		<author><name>Mark</name></author>
	</entry>
</feed>