Droid versus Ios efficiency.

NoasArcAngel

Wise Old Owl
So i came up with a simple way how you can bluntly calculate the efficiency of an os.

efficiency of an os = number of threads processed / per cpu cycle.

power required to run os is directly proportional to the number of cpu cycles.

Thus you can run the same app on 2 phones , one droid and one i0s having same cpu clocks and similar battery and find out which gives up first. End of story.

Or if there is a counter for the number of cycles you can do that in developer mode.

by Droid I mean android only I thought it sounded more macho.
the redragon who is a real troll did not realise the wildfire uses an a11 ARM whereas the 3gs uses a8 so thats a
generation gap there.....
 
Last edited:
OP
AndroidFan

AndroidFan

Peak Oil is real!
There is an excellent discussion on this subject on Google Plus, by a Google employee Dianne Hackborn. You should check it out... Highly recommended... -- *plus.google.com/105051985738280261832/posts/2FXDCz8x93s

How about some Android graphics true facts?


I get tired of seeing so much misinformation posted and repeated all over the place about how graphics rendering works on Android. Here is some truth:

• Android has always used some hardware accelerated drawing. Since before 1.0 all window compositing to the display has been done with hardware.

• This means that many of the animations you see have always been hardware accelerated: menus being shown, sliding the notification shade, transitions between activities, pop-ups and dialogs showing and hiding, etc.

• Android did historically use software to render the contents of each window. For example in a UI like *www.simplemobilereview.com/wp-content/uploads/2010/12/2-home-menu.png there are four windows: the status bar, the wallpaper, the launcher on top of the wallpaper, and the menu. If one of the windows updates its contents, such as highlighting a menu item, then (prior to 3.0) software is used to draw the new contents of that window; however none of the other windows are redrawn at all, and the re-composition of the windows is done in hardware. Likewise, any movement of the windows such as the menu going up and down is all hardware rendering.

• Looking at drawing inside of a window, you don’t necessarily need to do this in hardware to achieve full 60fps rendering. This depends very much on the number of pixels in your display and the speed of your CPU. For example, Nexus S has no trouble doing 60fps rendering of all the normal stuff you see in the Android UI like scrolling lists on its 800x480 screen. The original Droid however struggled with a similar screen resolution.

• "Full" hardware accelerated drawing within a window was added in Android 3.0. The implementation in Android 4.0 is not any more full than in 3.0. Starting with 3.0, if you set the flag in your app saying that hardware accelerated drawing is allowed, then all drawing to the application’s windows will be done with the GPU. The main change in this regard in Android 4.0 is that now apps that are explicitly targeting 4.0 or higher will have acceleration enabled by default rather than having to put android:handwareAccelerated="true" in their manifest. (And the reason this isn’t just turned on for all existing applications is that some types of drawing operations can’t be supported well in hardware and it also impacts the behavior when an application asks to have a part of its UI updated. Forcing hardware accelerated drawing upon existing apps will break a significant number of them, from subtly to significantly.)

• Hardware accelerated drawing is not all full of win. For example on the PVR drivers of devices like the Nexus S and Galaxy Nexus, simply starting to use OpenGL in a process eats about 8MB of RAM. Given that our process overhead is about 2MB, this is pretty huge. That RAM takes away from other things, such as the number of background processes that can be kept running, potentially slowing down things like app switching.

• Because of the overhead of OpenGL, one may very well not want to use it for drawing. For example some of the work we are doing to make Android 4.0 run well on the Nexus S has involved turning off hardware accelerated drawing in parts of the UI so we don’t lose 8MB of RAM in the system process, another 8MB in the phone process, another 8MB in the system UI process, etc. Trust me, you won’t notice -- there is just no benefit on that device in using OpenGL to draw something like the status bar, even with fancy animations going on in there.

• Hardware accelerated drawing is not a magical silver bullet to butter-smooth UI. There are many different efforts that have been going on towards this, such as improved scheduling of foreground vs. background threads in 1.6, rewriting the input system in 2.3, strict mode, concurrent garbage collection, loaders, etc. If you want to achieve 60fps, you have 20 milliseconds to handle each frame. This is not a lot of time. Just touching the flash storage system in the thread that is running the UI can in some cases introduce a delay that puts you out of that timing window, especially if you are writing to storage.

• A recent example of the kinds of interesting things that impact UI smoothness: we noticed that ICS on Nexus S was actually less smooth when scrolling through lists than it was on Gingerbread. It turned out that the reason for this was due to subtle changes in timing, so that sometimes in ICS as the app was retrieving touch events and drawing the screen, it would go to get the next event slightly before it was ready, causing it to visibly miss a frame while tracking the finger even though it was drawing the screen at a solid 60fps. (Edit: for those who need this made clear, yes of course this particular issue is fixed.)

• When people have historically compared web browser scrolling between Android and iOS, most of the differences they are seeing are not due to hardware accelerated drawing. Originally Android went a different route for its web page rendering and made different compromises: the web page is turned in to a display list, which is continually rendered to the screen, instead of using tiles. This has the benefit that scrolling and zooming never have artifacts of tiles that haven’t yet been drawn. Its downside is that as the graphics on the web page get more complicated to draw the frame rate goes down. As of Android 3.0, the browser now uses tiles, so it can maintain a consistent frame rate as you scroll or zoom, with the negative of having artifacts when newly needed tiles can’t be rendered quickly enough. The tiles themselves are rendered in software, which I believe is the case for iOS as well. (And this tile-based approach could be used prior to 3.0 without hardware accelerated drawing; as mentioned previously, the Nexus S CPU can easily draw the tiles to the window at 60fps.)

• Hardware accleration does not magically make drawing performance problems disappear. There is still a limit to how much the GPU can do. A recent interesting example of this is tablets built with Tegra 2 -- that GPU can touch every pixel of a 1280x800 screen about 2.5 times at 60fps. Now consider the Android 3.0 tablet home screen where you are switching to the all apps list: you need to draw the background (1x all pixels), then the layer of shortcuts and widgets (let’s be nice and say this is .5x all pixels), then the black background of all apps (1x all pixels), and the icons and labels of all apps (.5x all pixels). We’ve already blown our per-pixel budget, and we haven’t even composited the separate windows to the final display yet. To get 60fps animation, Android 3.0 and later use a number of tricks. A big one is that it tries to put all windows into overlays instead of having to copy them to the framebuffer with the GPU. In the case here even with that we are still over-budget, but we have another trick: because the wallpaper on Android is in a separate window, we can make this window larger than the screen to hold the entire bitmap. Now, as you scroll, the movement of the background doesn’t require any drawing, just moving its window... and because this window is in an overlay, it doesn’t even need to be composited to the screen with the GPU.

• As device screen resolution goes up, achieving a 60fps UI is closely related to GPU speed and especially the GPU’s memory bus bandwidth. In fact, if you want to get an idea of the performance of a piece of hardware, always pay close attention to the memory bus bandwidth. There are plenty of times where the CPU (especially with those wonderful NEON instructions) can go a lot faster than the memory bus.

EDIT:

Wow this has generated a lot more discussion, and I won't be able to address nearly everything that has been raised. But I'll try to expand on things a bit here to better address what I think are some of the more interesting points.

Some have raised points along the lines of Samsung Galaxy S2 phones already having a smoother UI and indicating that they are doing something different vs. the Galaxy Nexus. When comparing individual devices though you really need to look at all of the factors. For example, the S2's screen is 480x800 vs. the Galaxy Nexus at 720x1280. If the Nexus S could already do 60fps for simple UIs on its 480x800, the CPU in the S2's is even better off.

The real important difference between these two screens is just that the Galaxy Nexus has 2.4x as many pixels that need to be drawn as the S2. This means that to achieve the same efficiency at drawing the screen, you need a CPU that can run a single core at 2.4x the speed (and rendering a UI for a single app is essentially not parallelizable, so multiple cores isn't going to save you).

This is where hardware accelerated rendering really becomes important: as the number of pixels goes up, GPUs can generally scale much better to handle them, since they are more specialized at their task. In fact this was the primary incentive for implementing hardware accelerated drawing in Android -- at 720x1280 we are well beyond the point where current ARM CPUs can provide 60fps. (And this is a reason to be careful about making comparisons between the Galaxy Nexus and other devices like the S2 -- if you are running third party apps, there is a good chance today that the app is not enabling hardware acceleration, so your comparison is doing CPU rendering on the Galaxy Nexus which means you almost certainly aren't going to get 60fps out of it, because it needs to hit 2.4x as many pixels as the S2 does.)

To be complete, there is another big advantage that the GPU gives you -- many more drawing effects become feasible. For example, if you are drawing a bitmap in software, you basically can't do anything to it except apply an offset. Just trying to scale it is going to make rendering significantly slower. On a GPU, applying transformations well beyond simple scales is basically free. This is why in the new default Holo themes in Android we have background images -- with hardware accelerated drawing, we can afford to draw (and scale) them. In fact, if the hardware path is not enabled by the app, these background images will be turned off.
 
OP
AndroidFan

AndroidFan

Peak Oil is real!
Efficiency depends on how a particular app or game is coded... most battery sucking and resource sucking apps are because of bad coding. For example,

Here's what not to do when writing an Android application, courtesy of Glu Mobile.

The game Bug Village has two services that it tells Android need to always be running. And as if that's not enough, the services are running in different processes. Together these two processes are almost 10MB, which in a lower-end device is 10% or more of the typical available RAM for cached background processes.

This is terribly rude. Don't do this unless you really need to.

If you are writing an Exchange client and need to maintain an active connection with an Exchange server? Yeah, that's why this is possible.

If you are writing a game? No.

And no matter what, for the love of all, don't use two processes to do this.

*lh3.googleusercontent.com/-ZRKA-K2yGG0/T2OvSQy5JJI/AAAAAAAAG9k/8_JL9uVKs0g/s544/BugVillage.png

iOS and WP7 are more efficient, because they don't have true multitasking... A real eye opener is this article...

Fraser Speirs - Blog - Misconceptions About iOSMultitasking

the iOS multitasking bar does not contain "a list of all running apps". It contains "a list of recently used apps". The user never has to manage background tasks on iOS.

Let's get technical: iOS apps have five states of execution. These are:

*Not running - the app has been terminated or has not been launched.
*Inactive - the app is in the foreground but not receiving events (for example, the user has locked the device with the app active)
*Active - the normal state of "in use" for an app
*Background - the app is no longer on-screen but is still executing code
*Suspended - the app is still resident in memory but is not executing code

When you press the home button, the app moves from Active to Background. Most apps usually then go from Background to Suspended in a matter of seconds.

The first technical caveat is that Suspended apps remain in the device's memory. This is so they can resume more quickly when you go back to them. They're not using processor time and they're not sucking battery power.

You may think that, if an app is resident in memory, you have to somehow remove it to conserve memory. You don't because iOS does it for you. If there are Suspended apps lying around and you launch a memory-intensive app such as a big game, iOS will start to purge Suspended apps and move them to the Not Running state. That is, they will be completely removed from memory and will launch afresh the next time you tap their icon

But Android is simply different... It has true multitasking, and sometimes, limited resources on the phone, combined with poor coding, can lead to slowdowns...
 

red dragon

Master troll
the redragon who is a real troll did not realise the wildfire uses an a11 ARM whereas the 3gs uses a8 so thats a
generation gap there.....
What is your point mate?
Yes I love to troll people like you,who have used Android for a couple of months and consider themselves major geeks.I d
Do you have any idea that your post does not make any sense at all!
Just post it in xda(hope you heard of it),even rabid Android fanboys will troll you mercilessly.
Are not you the same person who created a thread on ipad vs Android tablet here?
Before trying to start a flame war,please learn the basics first.
I am sure ico will lock this thread soon ,but would love to discuss Android with you mate!
@ico,please let this thread live buddy.
 

NoasArcAngel

Wise Old Owl
What is your point mate?
Yes I love to troll people like you,who have used Android for a couple of months and consider themselves major geeks.I d
Do you have any idea that your post does not make any sense at all!
Just post it in xda(hope you heard of it),even rabid Android fanboys will troll you mercilessly.
Are not you the same person who created a thread on ipad vs Android tablet here?
Before trying to start a flame war,please learn the basics first.
I am sure ico will lock this thread soon ,but would love to discuss Android with you mate!
@ico,please let this thread live buddy.

Yea bro you said that even the apple iphone 3gs has a 600mhz processor. What i am trying to say is that, read carefully and try to understand plz.

Apple : lets make a phone with good hardware and optimise apps so that they run the best. The only thing which consumers care about is what they see..

Android : :eek: time for some multitasking.

What i am trying to say is that : The apple Ios, with all its fluid features is not efficient, heck not even is the windows os. I gave you a simple method above to check out the efficiency of an os, tell me as a developer i am wrong. Whenever you compare apple devices with others they should be in the same hardware league. Apple devices are generation ahead of what is currently available in the market. My HTC wildfire has a quallcomm processor which is based on arm 11 baseband. The iphone 3gs uses a cortex a8 processor. The difference is that per clock the CPU operates the cortex a8 gives u 2 more cycles. So thats virtually doubling of cpu resources and also since the cortex a8 is based on the new architecture your efficiency per cycle is nearly doubled. The iphone 3gs uses a power vr gpu. In the wildfire, the 528 mhz quallcomm processor also includes a gpu. So where the hell is the similarity of hardware? and how the hell can you compare them?

Yes XDA developers.... zzzz..... no big deal dude move on to the real world.

I am talking in terms of hardware data. Something which software geeks / developers are not very good at. You may know how to program an app but do you know how the systems inside work?

As far as developers are concerned there ware very few people who have the level of knowledge required to know the insights and pros and cons of how a system works.

Yes i created an ipad vs android tablet thread here. I did not know that the apps for the android tablets was less in number and i went only at the numbers. Because any android tablet worth its salt will simply bury the ipad 2 in the ground. And as far as the tegra 3 tablet is concerned , its raw cpu power is 2x ipad 3.

No i dont consider myself an android fanboy and i do not consider myself as a geek, what i know is that i know hardware. And what i also know is that you know nothing about it.
 

Anorion

Sith Lord
Staff member
Admin
^yep dude iPhones a generation ahead, it cant be compared, Retina Display does not allow for a fair comparison

dont see a need to compare

you run the same apps on droids and iPhones, there's no real visible performance difference, bunch of us play Lane Splitter, Orbital, Angry Birds on a Pop, Wildfire and 3GS... once the apps starts... its exactly the same... doesnt matter which device ur playing on at all

if the performance is measured in how much lag or bugs/glitchers are there, ofc droids are gonna lose coz of their very nature

yeah iOS does not support multi-tasking... in the same way that android gives users the freedom to run a truckload of apps at once... but the save state works wonderfully, if you get a call, you can continue playing a game at the exact instant you let off... and all the critical things woik as expected too... for example you can use Saavn or You Tube to play music and then switch to Lane Splitter and continue playing. Try doing that on a droid.
 

NoasArcAngel

Wise Old Owl
AnandTech - Samsung Galaxy S 2 (International) Review - The Best, Redefined

Read the Mobile Soc Gpu comparison. The iphone 4s uses a power vr 543mp2 gpu which has a raw bandwidth of 19.2Gb/s whereas the gs2 uses a gpu mali 400 which has a raw output of 10.8Gb/s So tell me really is there any comparison ? or is the android really inefficient?

The power vr 543mp2 used in the iphone 4s is clocked at 800mhz which is only 200mhz less than the ipad 2 gpu. YES the damn GPU with 200mhz more runs a full fledged tablet. ....

You want to bring it on now ???? check these out :
AnandTech - The HTC One X for AT&T Review
AnandTech - Apple iPhone 4S: Thoroughly Reviewed

These 2 phones run pretty much the same cpu. Now talk about efficiency. The HTC one X clearly blows the iphone 4s in competition. in literally each test. for the one which are related to the cpu

And obviously the iphone 4s has a tablet level GPU , so it is really no point trying to compare that with an android phone.

the gpu in the one x provides 4x as less bandwidth than the iphone 4s .. 4x LESS thats a 400 % difference only in the gpu, and runs the same resolution screen so how does that count for efficiency ?

as anandtech says it : "We expected Snapdragon S4 to do very well here based on our preview numbers and it did not disappoint. Although it's not quite as fast as Intel's Medfield, it's clearly the fastest smartphone SoC in this test otherwise. It's worth noting that HTC is able to deliver performance that's within 5% of Qualcomm's Snapdragon S4 MDP, a significant improvement over where things were last year.

The Sunspider test makes good use of 1 - 2 cores but there are times when it'll stress all four on a Tegra 3. For the most part however, NVIDIA's extra cores go unused in this benchmark
"

And you can bubbling here you can see just how REALLY EFFICIENT THE WP IS :
AnandTech - Nokia Lumia 900 Review - Windows Phone with LTE

*images.anandtech.com/graphs/graph5724/45457.png

*images.anandtech.com/graphs/graph5724/45458.png



still a " As I touched on before, the platform is still a Qualcomm-only party, and the name of the game is single core 45nm Snapdragon with Adreno 205 at the high end in the form of either MSM8x55, or for the Lumia 900 APQ8055 at 1.4 GHz."
 

pranav0091

I am not an Owl
Buddy, efficiency is not that easy to calculate. And I dont really know of any processor that can handle more than a thread in a clock cycle. Maybe you were referring to instructions per clock cycle. But again numbers can me misleading. Tats why we have benchmarks. If everything were real simple like taking a product of two numbers they would've not been needed.

There is something called pipelining and the number of stages it has. Then there is the clock speed itself. The number crunching is a function of all these an some more things.
 

NoasArcAngel

Wise Old Owl
Buddy, efficiency is not that easy to calculate. And I dont really know of any processor that can handle more than a thread in a clock cycle. Maybe you were referring to instructions per clock cycle. But again numbers can me misleading. Tats why we have benchmarks. If everything were real simple like taking a product of two numbers they would've not been needed.

There is something called pipelining and the number of stages it has. Then there is the clock speed itself. The number crunching is a function of all these an some more things.

Thats why i said bluntly because there will always be other factors like how the data stream is working what is the archiecture of the sytem. But benchmarks ans raw power scores provide some result and we cannot compare the efficiency of 2 devices jus by looking at them hence benchmarks are the only logically possible tests

but you need to have some power also, comparing an android htc one x and iphone 4s is useless because except for the cpu there really is no competition. Yet i find people talking about how android is inefficient

and this is something that people should realise, that the android is not inefficient you are just not giving it enough damn power.......

and now after seeing the benchmarks do you think that android is really inefficient?

i can see you red dragon... My sight set on you .. Btw buddy forget about the flaming and i want to say i am sorry no hard feelings.
 

pranav0091

I am not an Owl
Thats the whole point of the 'inefficiency' talk.
Who can do the best in a given amount of resources. Inefficient is not exactly saying its slow. Its slow with price comparable hardware (not market price of phones mind you).
 

red dragon

Master troll
@NoasArcAngel,
No offense mate,but you need to get your basics right.
Now this post is going to be very long.....just skip it,if you want to keep on fighting with some vague and superficial comment on how these two o.s multi-task.I will try not to use a single technical term and make it as simple as possible.



Starting from iOS 4, Apple’s has allowed user somewhat like a multitasking ability with a quick double press of the home button.Something like a multi tasking bar appears below the screen. long-press on an icon allows the user to remove an app from the multitasking bar.
It looks like removing the app is freeing some memory…BUT THIS IS ABSOLUTELY NOT THE CASE.
The multitasking look alike bar at the bottom merely shows the recent apps and has no relation with the running apps.
An ios app essentially passes through 5 different phases
1.Active phase-the app is in foreground and running code,i.e using cpu cycle
2.Background phase-once the home button is pressed once the active app goes in the back ground,but still running codes
3.Suspended phase-the app is now not running the code but is still cached in the memory
4.Inactive-not cached in the memory
4.Not running-the obvious,the app has not started
Now Apple within its stone walled ios simply does not allow any app(there are exceptions,will explain them later)in the background phase to run code for a few seconds.
Any app which keeps on coding in the background and does not enter the suspended phase usually never sees the light of the Appstore.They are regarded as badly coded app[which is partially true for a mobile devices which always run on battery]

There are a few exceptions to this rule,
VOIPs like Skype,the default and some 3rd party music players and location based apps are allowed to run in the background phase.

This type of coding structure does have some advantages,the most important being better battery life.




Now coming to mighty Android,
The multitasking hero…
Unlike io.s this offspring of uncle Google actually does proper multi tasking,i.e an app can stay in back ground and can keep on coding[an kill the battery in the process]
The beauty of Android is the developer of an app can make an app code forcibly in the back ground[this particular part is extremely complicated and deals with broadcast receivers and service components…these things can actually help to develop potentially harmful malwares in wrong hands]
Now the funny part,
Android from GB days has matured enough to kill unnecessary background codings automatically to free up memory and thus virtually buried once extremely popular app called ATK(we all have used it at certaint point of time,aint we?)
Now despite this smart app management in GB,Google has actually gone a step backwords,to satisfy a few of their idiot fanboys[and they are no less in number than the isheep]
The new multi tasking look alike thing in ICS[swiping apps away like cards to remove them from the list]may give the users a mighty feeling that they are removing an app themselves and freeing up some memory,but in reality it is just as rudimentary as io.s.

This true multitasking ability is definitely beneficial for some[who actually know how to use it] but do take a hit on the battery.
And the absolute lawlessness of Android market[I refuse to call it playshop] with thousands of apps coded by 5th or 6th grade students can turn this beautiful multitasking ability of Android into its Achilis heel.

I would also like to write a few words on real multitasking mobile oses like the beautiful Web os or Meego,but my fingers are aching after writing such a long post(may be the second longest I have ever wrote)

Another thing mate!DO NOT ever show disrespect for xda.even in the Android madness,it still has some wonderful developers.
Learn to respect others,increase your knowledge.you will be loved and respected in return.
 

Anorion

Sith Lord
Staff member
Admin
:rofl: these are phones
try not to get personal ppl

multitasking is better on the iOS even though it does not "support multi-tasking"
 

WolVish

Broken In
I think MeeGo Harmattan should be included in this topic. I've been using Nokia N9 for a week now and I find it way better than Android in Multi tasking. It still has tonnes of bugs, but it was DOA and is getting better with updates. It works really cool with an outdated 1 GHz Single core proccy and 1 GB of RAM.
 

red dragon

Master troll
multitasking is better on the iOS even though it does not "support multi-tasking"
It seems very few people understand this simple thing:wink:

I think MeeGo Harmattan should be included in this topic. I've been using Nokia N9 for a week now and I find it way better than Android in Multi tasking. It still has tonnes of bugs, but it was DOA and is getting better with updates. It works really cool with an outdated 1 GHz Single core proccy and 1 GB of RAM.
Absolutely!The best two multitasking o.ses are dead now!
 
OP
AndroidFan

AndroidFan

Peak Oil is real!
Java is killing Android. Virtual Machine interpreter sucks.

One day Google will move on to support better languages like C, C++ and C#... Until then, will have to throw more and more powerful hardware at the problem...
 

Sujeet

Undead!!!
Java is killing Android. Virtual Machine interpreter sucks.

One day Google will move on to support better languages like C, C++ and C#... Until then, will have to throw more and more powerful hardware at the problem...

*www.thinkdigit.com/forum/technology-news/156411-android-ported-c.html#post1641664
 
Top Bottom