<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Occipital - Blog &#187; android</title>
	<atom:link href="http://blog.occipital.com/category/android/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.occipital.com</link>
	<description>It starts with pixels</description>
	<lastBuildDate>Sat, 31 Dec 2011 19:07:22 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Android G1 hardware DOES support multi-touch</title>
		<link>http://blog.occipital.com/2008/11/17/android-g1-hardware-does-support-multi-touch/</link>
		<comments>http://blog.occipital.com/2008/11/17/android-g1-hardware-does-support-multi-touch/#comments</comments>
		<pubDate>Mon, 17 Nov 2008 08:54:02 +0000</pubDate>
		<dc:creator>jeff</dc:creator>
				<category><![CDATA[android]]></category>
		<category><![CDATA[g1]]></category>
		<category><![CDATA[multi-touch]]></category>
		<category><![CDATA[synaptics]]></category>

		<guid isPermaLink="false">http://occipital.com/blog/?p=92</guid>
		<description><![CDATA[There has been a lot of uneducated speculation about whether the Android G1 could support multi-touch.  I just came across this post by a smart guy who recompiled the synaptics touchscreen driver and got it to track two fingers. Bravo! No stupid YouTube video like previous attempts at proving this, just some clean console output [...]]]></description>
			<content:encoded><![CDATA[<p>There has been a lot of uneducated speculation about whether the Android G1 could support multi-touch.  I just came across <a href="http://www.ryebrye.com/blog/2008/11/17/proving-the-g1-screen-can-handle-multi-touch/">this post</a> by a smart guy who recompiled the synaptics touchscreen driver and got it to track two fingers.  Bravo!</p>
<p>No stupid YouTube video like previous attempts at proving this, just some clean console output (trimmed):</p>
<p><code><br />
x  688, y 3921, z  17, w  1, F 0, 2nd: x    0, y    0, z  17, w  1,<br />
x  696, y 3892, z  21, w  1, F 0, 2nd: x    0, y    0, z  21, w  1,<br />
x  700, y 3887, z  24, w 13, F 0, 2nd: x    0, y    0, z  24, w 13,<br />
x  700, y 3868, z  53, w  7, F 2, 2nd: x 2859, y 1168, z  53, w  7,<br />
x  697, y 3867, z  61, w  6, F 2, 2nd: x 2863, y 1162, z  61, w  6,<br />
x  692, y 3864, z  64, w  7, F 2, 2nd: x 2863, y 1166, z  64, w  7,<br />
x  683, y 3860, z  67, w 10, F 2, 2nd: x 2867, y 1170, z  67, w 10,<br />
x  677, y 3857, z  68, w 11, F 2, 2nd: x 2867, y 1170, z  68, w 11,<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.occipital.com/2008/11/17/android-g1-hardware-does-support-multi-touch/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Android performance 3: iPhone comparison</title>
		<link>http://blog.occipital.com/2008/11/02/android-performance-3-iphone-comparison/</link>
		<comments>http://blog.occipital.com/2008/11/02/android-performance-3-iphone-comparison/#comments</comments>
		<pubDate>Sun, 02 Nov 2008 20:13:06 +0000</pubDate>
		<dc:creator>jeff</dc:creator>
				<category><![CDATA[android]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[objective-c]]></category>
		<category><![CDATA[performance]]></category>

		<guid isPermaLink="false">http://occipital.com/blog/?p=80</guid>
		<description><![CDATA[The internet is just incredible. Within 30 minutes of logging onto the #iphonedev IRC channel on freenode, I got timing results for the iPhone on the simple loop benchmark from my last post. Thanks to &#8216;august&#8217; for the help. Here&#8217;s the benchmark converted into objective-C: NSDate *start = [NSDate date]; int arr[8*320*480]; for(int i = [...]]]></description>
			<content:encoded><![CDATA[<p>The internet is just incredible.  Within 30 minutes of logging onto the #iphonedev IRC channel on freenode, I got timing results for the iPhone on the simple loop benchmark from my last post.  Thanks to &#8216;august&#8217; for the help.</p>
<p>Here&#8217;s the benchmark converted into objective-C:</p>
<p><code><br />
NSDate *start = [NSDate date];<br />
int arr[8*320*480];<br />
for(int i = 0; i &lt; (8*320*480); i++)<br />
arr[i] = i;<br />
NSDate *end = [NSDate date];<br />
NSLog(@"%g", [end timeIntervalSinceDate:start]);</code></p>
<p>Results:</p>
<ul>
<li>iPhone (2.1 firmware, Objective-C): <strong>9.5 milliseconds</strong></li>
</ul>
<p>And, from last time:</p>
<ul>
<li>G1 (R29 firmware): 922 milliseconds.</li>
<li>G1 (R29 firmware): Loop only. 520 milliseconds.</li>
</ul>
<p>Conclusions:</p>
<p>Objective-C kills the Java implementation on Android.  It&#8217;s almost exactly 100 times faster.  Note that I&#8217;m unsure if the memory allocation is included in the timing, so a more conservative statement is that Objective-C can run a tight loop 50 times faster than the Dalvik JVM.  It&#8217;s also true that real applications aren&#8217;t full of tight loops, and a real Android application won&#8217;t be 50 times slower than an iPhone counterpart.  Nevertheless, all else being equal, it will be slower, and potentially <em>a lot</em> slower.</p>
<p>For now, we&#8217;re sadly going to put our Android development on hold and switch to iPhone, and keep an eye out for performance improvements.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.occipital.com/2008/11/02/android-performance-3-iphone-comparison/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Android performance 2: Loop speed and the Dalvik VM</title>
		<link>http://blog.occipital.com/2008/10/31/android-performance-2-loop-speed-and-the-dalvik-vm/</link>
		<comments>http://blog.occipital.com/2008/10/31/android-performance-2-loop-speed-and-the-dalvik-vm/#comments</comments>
		<pubDate>Sat, 01 Nov 2008 04:14:07 +0000</pubDate>
		<dc:creator>jeff</dc:creator>
				<category><![CDATA[android]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[dalvik]]></category>
		<category><![CDATA[performance]]></category>

		<guid isPermaLink="false">http://occipital.com/blog/?p=71</guid>
		<description><![CDATA[Let&#8217;s run a simple benchmark on the G1. I had noticed that Android was running on some Java virtual machine called Dalvik, but hadn&#8217;t given it much attention otherwise.  It turns out to be pretty important, after all.  As far as I can tell, Google decided it would be a good idea to favor a [...]]]></description>
			<content:encoded><![CDATA[<p>Let&#8217;s run a simple benchmark on the G1.</p>
<p>I had noticed that Android was running on some Java virtual machine called <a href="http://sites.google.com/site/io/dalvik-vm-internals">Dalvik</a>, but hadn&#8217;t given it much attention otherwise.  It turns out to be pretty important, after all.  As far as I can tell, Google decided it would be a good idea to favor a small memory footprint over speed.  Here&#8217;s the benchmark I just performed:</p>
<pre>long start = android.os.SystemClock.uptimeMillis();
int[] image = new int[8*320*400];
for(int i = 0; i &lt; (8*320*480); i++) {
   image[i] = i;
}
long end = android.os.SystemClock.uptimeMillis();
long elapsed = end - start;</pre>
<p> <br/><br />
So, how long did it take?</p>
<ul>
<li>G1 (R29 firmware):  <strong>922 milliseconds.</strong></li>
<li>G1 (R29 firmware).  Loop only.  520 milliseconds.</li>
</ul>
<p>And, for comparison:</p>
<ul>
<li>Fujitsu T4220 (2.4 GHz Intel T7700).  C#. 14 milliseconds.</li>
<li>Fujitsu T4220 (2.4 GHz Intel T7700).  Java. <strong>16 milliseconds.</strong></li>
</ul>
<p>Note: I ran everything in &#8220;Run&#8221; mode (not Debug mode).  (Debug mode causes the G1 to run about 4X slower in this benchmark.)</p>
<p>Conclusions:</p>
<p><strong>Dalvik puts a big wall between you and the (already pretty slow) CPU.<br />
</strong></p>
<p>It is claimed that Dalvik is designed for slow machines with low memory, powered by a battery.  However, I don&#8217;t understand how the Dalvik interpret-only VM actually achieves this, other than through programmer castration.  What does that mean?  Well, you can&#8217;t really do much on Android that isn&#8217;t built into the runtime, or your application will crawl, and you&#8217;ll be forced to strip those features out and rely on the optimized ones that are built into the libraries.  The memory footprint for Dalvik is lower, because there&#8217;s no JIT compiled chunks of code sitting in RAM.  But isn&#8217;t RAM cheap, fast, and low-power these days?</p>
<p>Next time (Android performance 3):</p>
<ul>
<li><strong>A duel with the iPhone.</strong>  I&#8217;d like to run this same trivial benchmark on an iPhone in Objective C and see what happens.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.occipital.com/2008/10/31/android-performance-2-loop-speed-and-the-dalvik-vm/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Android performance 1: The G1</title>
		<link>http://blog.occipital.com/2008/10/31/android-performance-1-the-g1/</link>
		<comments>http://blog.occipital.com/2008/10/31/android-performance-1-the-g1/#comments</comments>
		<pubDate>Fri, 31 Oct 2008 20:55:39 +0000</pubDate>
		<dc:creator>jeff</dc:creator>
				<category><![CDATA[android]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[g1]]></category>
		<category><![CDATA[performance]]></category>

		<guid isPermaLink="false">http://occipital.com/blog/?p=69</guid>
		<description><![CDATA[We are starting to develop on Android. The first Android device, of course, is the HTC/T-Mobile G1. We got one of the units this week, and I am just starting to look into exactly how fast the G1 runs. Performance is a hard thing to measure, but I wanted to start blogging about it in [...]]]></description>
			<content:encoded><![CDATA[<p>We are starting to develop on Android.  The first Android device, of course, is the HTC/T-Mobile G1.  We got one of the units this week, and I am just starting to look into exactly how fast the G1 runs.  Performance is a hard thing to measure, but I wanted to start blogging about it in the hopes we can start a discussion and learn more about how to best measure and optimize performance on Android devices.</p>
<p>The best way to start, I think, is to just list the hardware specifications (from <a href="http://en.wikipedia.org/wiki/T-Mobile_G1">Wikipedia</a>).</p>
<ul>
<li><strong>CPU:</strong> Qualcomm MSM7201A (<a href="http://www.ent.eetchina.com/PDF/2007FEB/DTCOL_2007FEB15_AVDE_RFR_AN_01.pdf?SOURCES=DOWNLOAD">MSM7200 details</a>)</li>
<li>528 MHz.  <a href="http://en.wikipedia.org/wiki/ARM_architecture">ARM11</a> (same family as iPhone).<br />
274MHz ARM9 coprocessor (not really &#8220;dual core&#8221; as is commonly claimed).<br />
Java hardware acceleration but <em>not on the Dalvik VM </em>(Android).</li>
<li><strong>GPU:</strong> (Shared with CPU)<br />
Capable of 4M triangles/sec.<br />
Capable of hardware-based image signal processor and JPEG encoder.</li>
<li><strong>Video Decoding:</strong><br />
Chip <a href="http://http://www.ent.eetchina.com/PDF/2007FEB/DTCOL_2007FEB15_AVDE_RFR_AN_01.pdf?SOURCES=DOWNLOAD">supports</a> 30fps VGA in<br />
MPEG-4, H.263, H.264, Windows Media® and RealNetworks®</li>
<li><strong>Video Encoding: </strong> (Not yet available on Android!)<br />
Chip <a href="http://www.ent.eetchina.com/PDF/2007FEB/DTCOL_2007FEB15_AVDE_RFR_AN_01.pdf?SOURCES=DOWNLOAD">supports</a> 30fps VGA in<br />
MPEG-4, H.263 and H.264</li>
<li><strong>Network speed:</strong><br />
Supports T-Mobile UMTS (3G) 800/1700/2100 MHz<br />
Possibly supports AT&amp;T UMTS (3G) 850/1900/2100 MHz.  <a href="http://i.cmpnet.com/eetimes/news/online/2008/10/igoogle_2.jpg">This disassembly</a> shows the RTR6285 radio chipset, which supports <strong>both</strong> 3G platforms.  However, there are two power amplifiers &#8212; one at 2100 MHz, and one at 1700 MHz (T-Mobile frequencies).  Nevertheless, I don&#8217;t think the 1700 MHz amplifier attenuates 1900 MHz.  Look at the <a href="http://www.avagotech.com/docs/AV02-0647EN">datasheet</a> and see what you think.  So AT&amp;T 3G would probably have a reduced range, but I think you could make it work.</li>
</ul>
<p>There are a few open questions I&#8217;d like to answer related to this specification list.  Can the G1 support AT&amp;T 3G (see above)?  Does the Android JVM benefit from the CPU&#8217;s Java hardare acceleration?  Does the JPEG encoding (Bitmap class) on G1 tap into the hardware?</p>
<p>We should also run a series of benchmarks and compare the Qualcomm processor&#8217;s Java performance, to, say, an Intel Core 2, for a number of tasks.  That way we can <em>roughly</em> estimate how fast something will run on a G1 before actually porting and deploying.  If you&#8217;ve seen any benchmarks like this, let me know, so we don&#8217;t reinvent the wheel!</p>
<p>Next time (Android performance 2):</p>
<ul>
<li>Benchmark for a simple array-indexing loop.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.occipital.com/2008/10/31/android-performance-1-the-g1/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

