<?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%3Aaomr001</id>
	<title>SE250:lab-1:aomr001 - 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%3Aaomr001"/>
	<link rel="alternate" type="text/html" href="https://wiki.kram.nz/index.php?title=SE250:lab-1:aomr001&amp;action=history"/>
	<updated>2026-06-08T19:45:59Z</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:aomr001&amp;diff=4231&amp;oldid=prev</id>
		<title>Mark: 1 revision(s)</title>
		<link rel="alternate" type="text/html" href="https://wiki.kram.nz/index.php?title=SE250:lab-1:aomr001&amp;diff=4231&amp;oldid=prev"/>
		<updated>2008-11-03T05:18:39Z</updated>

		<summary type="html">&lt;p&gt;1 revision(s)&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;the aim of this lab was to measure the time taken to do an addition operation . &lt;br /&gt;
&lt;br /&gt;
i have decided to do this by doing a for loop for a million operations , by adding 2 integer numbers together for a million times.&lt;br /&gt;
to measure the time take i have used the clock function before starting the for loop and after the for loop,&lt;br /&gt;
then taking the time difference to measure how long it took to do the opertaions. &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;for (i=0; i &amp;lt; 10000; i++){&lt;br /&gt;
		j = 1 + 1;&lt;br /&gt;
	}&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
the time taken was 2 ms when using 2 integer numbers.&lt;br /&gt;
i have tried to use different variable types and found out that they vary in time taken to do these addition opertations.&lt;br /&gt;
for example: adding 2 double number .. took more time to do.. it took about 9 ms to carry out. &lt;br /&gt;
&lt;br /&gt;
i have also noticed that when i have removed the for loop and replaced it with a million operation manually ..&lt;br /&gt;
the operation took even longer time to do ..! &lt;br /&gt;
&lt;br /&gt;
another thing that could be mentioned is that almost everytime i tried to run the code to measure how long it takes&lt;br /&gt;
to do the operation i had different results, although i was using the same machine, which suggests that the &lt;br /&gt;
same machine could possibly carry out operations differently each time .. &lt;br /&gt;
&lt;br /&gt;
difficulties:&lt;br /&gt;
-the main difficulties that i faced were with the syntax. it has been a long time since i last used c to program .. &lt;br /&gt;
which meant that i couldn&amp;#039;t remmber most of the codes used. i had to get help from my mates a couple of times regarding the syntax. &lt;br /&gt;
- it was the first time that i have actually used the clock function.. it took me some time to figure out what it actually does.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
the task was reasonably easy to attempt. &lt;br /&gt;
&lt;br /&gt;
[[User:Aomr001|Aomr001]] 11:56, 4 March 2008 (NZDT)&lt;/div&gt;</summary>
		<author><name>Mark</name></author>
	</entry>
</feed>