Slashdot Mirror


Linaro Tweaks Speed Up Android, By Up To 100 Percent

Argon writes with an excerpt from Liliputing of interest to Android users: "'The folks behind the Linaro open source software project have put a little time into tweaking Google Android to use the gcc 4.7 toolchain. The result is a version of Android that can perform many tasks between 30 and 100 percent faster than the version of Android Google 4.0 Google currently offers through the AOSP (Android Open Source Project).' Adds Argon: "Note that there are CPU optimizations only since they have only access to binary blobs for GPU code."

28 of 97 comments (clear)

  1. So... by Anonymous Coward · · Score: 3, Funny

    that's where the guys with long hair are!

  2. DBZ reference by Linsaran · · Score: 3, Funny

    So we're building a faster more powerful android now? I wonder if the end result will be an energy draining old man, or a cocky teenager who's destined to become part of a biological super weapon.

    --
    In a bit of shameless internet panhandling, I accept Litecoin Donations at Lbd2oH9QsthD1GfuUXPyka12YxvWJYnBVf
  3. Better link by OzPeter · · Score: 5, Informative

    After digging through the TFA I found Linaro Android Puts Stock Android To Shame on TI Pandaboard (OMAP4430). Which after digging in the comments leads to www.linaro.org/
     
    But the meat of the whole report is contained in this comment from Bernhard Rosenkraenzer which contains some better stats and also links to the toolchains and source code.
     
    After this much manual digging I've realized that I'm getting to jaded for /.

    --
    I am Slashdot. Are you Slashdot as well?
    1. Re:Better link by ya+really · · Score: 5, Interesting

      After this much manual digging I've realized that I'm getting to jaded for /.

      I still come back to /. out of long time habit, but I stopped looking at /. for real meat on topics sadly some time ago. It's getting to be a lot of spammy articles with little substance compared to what it was five or more years ago.

      If you're interested in seeing more concrete discussion with substance, try reading over hacker news one day. They're also discussing Linaro

      and most of the commenters on hacker news tend to be developers of various device platforms.

    2. Re:Better link by Tenebrousedge · · Score: 3, Insightful

      The commentators on hacker news seem to be fewer in number and the focus and readership seems to be more about web technologies and startups. I could care less about your new jquery library for styling select boxes (or any reinventing-the-wheel-in-javascript project) and entrepreneurs are mostly failures waiting to happen.

      As far as I'm concerned Hacker News has a higher SNR.

      --
      Those who advocate genocide deserve every protection afforded by law, and none afforded by common human decency.
    3. Re:Better link by Gaygirlie · · Score: 5, Insightful

      Taken from Bero's comment:

      Obviously saying we’ve made it “twice as fast” is a bit of an oversimplification.

      This particular benchmark (the 3D benchmark included in 0xbench) runs twice as fast on this particular hardware. Other benchmarks (e.g. Sunspider) are “merely” 30% faster, some others are only slightly faster (e.g. GLMark2 – as it’s mostly GPU bound), and it would be possible to craft a benchmark showing that our build is 10 times faster (write a benchmark that uses strcpy, memset and friends heavily, which I’ve actually done, not to show off but to test if our changes are as beneficial as we’re hoping).

      As they say, the benchmark used is CPU-bound and as such what you're referring to is irrelevant. You can go ahead and test the optimizations made if you feel like, it is all there. A 3D benchmark was only chosen so they have something more interesting for the spectators to look at than a console application or Sunspider.

      Read more: http://www.cnx-software.com/2012/06/03/linaro-android-puts-stock-android-to-shame-on-ti-pandaboard-omap4430/#ixzz1xPbZP4t0

    4. Re:Better link by Stewie241 · · Score: 2

      I'm confused - you talk about readership being more about web technologies and startups with a tone that suggests that is a bad thing. You say you could care less about new jquery libraries. I guess I wonder how much less you could care. Then you talk about how entrepreneurs are mostly failures waiting to happen.

      Based on the overall tone of your article I got the sense that you looked upon Hacker News in a negative fashion. Yet, you finished the post by saying it had a higher signal to noise ratio, implying that it was actually better than Slashdot.

      I think some clarification is needed.

    5. Re:Better link by complete+loony · · Score: 2

      If this demo was waiting for a screen repaint before drawing the next frame (and since there's no flickering it's either doing that or triple buffering). Then if the cpu can paint the screen at 65fps, but your monitor can only do 60fps, then the demo will run at 60fps. However if the cpu can only paint at 55fps, then the demo will actually run at 30fps. eg each frame will be displayed by the monitor for 2 screen refreshes and the demo will take twice as long to run.

      That's the point I was trying to make. That if you are waiting for the monitor to paint each frame, a small difference in rendering speed can cause a large difference in fps.

      --
      09F91102 no, 455FE104 nope, F190A1E8 uh-uh, 7A5F8A09 that's not it, C87294CE no. Ah! 452F6E403CDF10714E41DFAA257D313F.
  4. Re:Meaning stats by negRo_slim · · Score: 5, Insightful
    I know a busy slashdotter such as yourself can't be bothered to move his greasy fingers the fraction of the inch required to actually open the article and as such here is some information you might find of interest:

    ... and the results are quite amazing with Android Linaro achieving about 60 fps in all 0xBenchmark tests (OpenGL Cube, OpenGL Blending, OpenGL Fog and Flying Teapot) whereas Android stock achieving 30 fps. They selected a benchmark tool that is mainly CPU bound, as they cannot optimize the GPU code since they can only access binary blobs.

    Also as you said yourself, it's a summary if you want the meat and potatoes of the data described just click on the damn thing instead of bitching.

    --
    On the Oregon Cost born and raised, On the beach is where I spent most of my days
  5. Re:Meaning stats by Sardak · · Score: 2

    Well, sure it does. To calculate how much faster it actually is, you take the time it didn't take (infinity - time_it_took) and multiply that by your new factor (1.3 to 2.0), then subtract that from infinity and you have your new rate.

  6. Re:battery life by gbjbaanb · · Score: 4, Informative

    it means the battery lasts longer - if you can twice the work in the same time, that means the same amount of work takes half the time - so you've cut your CPU usage by half.

    Of course, this doesn't mean your battery life doubles as most of the battery goes towards running the screen, but you should get a small boost which you''ll see when running CPU-intensive tasks, like games.

  7. Rebuilds for existing devices? by Barbarian · · Score: 3, Insightful

    The cynic in me says that even if it is a simple patch and recompile for existing android devices, we will never see it from any OEMs--it takes away some of the reason to buy the latest shiny.

    Here's hoping for the community android rebuilds...

    1. Re:Rebuilds for existing devices? by oakgrove · · Score: 4, Informative

      As always, the ever resourceful TeamDouche and Cyanogenmod are on it.

      --
      The soylentnews experiment has been a dismal failure.
    2. Re:Rebuilds for existing devices? by jeti · · Score: 2

      They claim to have cleaned up some code that prevented gcc optimizations from being used. If they check it in, builds with the standard toolchain can be improved as well.

  8. Re:100% faster, uhm no by Spodi · · Score: 4, Informative

    You're confusing this with something else. 100% faster means twice as fast. As in take the original speed, and add to it 100% of the original speed (e.g. 30 + (30 * 1.0)).

  9. Re:100% faster, uhm no by Immerman · · Score: 3, Informative

    No, you're confusing speed (a calculated value) with time required for completion (the easily-measured value) - they are inversely related to each other. The article claims 100% faster, not 100% less time required. In car terms: a car going 200mph is 100% faster than one going 100mph, and 300% faster than one going 50mph. The relevant equation is

    (percentage change) = (measured quantity - reference quantity) / (reference quantity)
    or alternately
    (percentage change) = (measured quantity) / (reference quantity) - 1

    which should make makes it obvious that the possible value range is [-100%, infinity)

    --
    --- Most topics have many sides worth arguing, allow me to take one opposite you.
  10. Port to Mono by svick · · Score: 2

    There's also another interesting research project: Porting Android to C# running under mono.

    In a benchmark they made (granted, it was focused on generics, where C# has serious performance advantage against Java), the port was about seven times faster.

    1. Re:Port to Mono by Henk+Poley · · Score: 2

      Truth be told, that 7x speedup was only in a part where they rewrote their autogenerated C# code to use some special construct that only exists in C# but not in Dalvik/Java. On a micro benchmark of that particular part they got a 7x speedup.

      Basically they found a special case where the C# compiler knows a trick that Java doesn't do, then pointed out such a case exists in AOSP and tweaked that source code file.

  11. Re:next thing to do... by Anonymous Coward · · Score: 5, Funny

    Yes, if only they used a modern language like .net then we could have pro-programmers working on it. Too bad no one has come out with a phone like that. I bet it would sell great if promoted by someone with a large desktop install base.

  12. Re:Misleading and/or overblown? by Gaygirlie · · Score: 2

    You clearly didn't read much. They are using a graphical benchmark because they need something to show to the spectators. Showing a console benchmark application or Sunspider wouldn't draw anyone's attention at Linaro Connect. Also, none of the code they did is related to graphics at all, they've e.g. optimized memset and strcpy which very very clearly have nothing to do with graphics or GPU whatsoever. Read the following excerpt from Bero's comment below:

    Obviously saying we’ve made it “twice as fast” is a bit of an oversimplification.

    This particular benchmark (the 3D benchmark included in 0xbench) runs twice as fast on this particular hardware. Other benchmarks (e.g. Sunspider) are “merely” 30% faster, some others are only slightly faster (e.g. GLMark2 – as it’s mostly GPU bound), and it would be possible to craft a benchmark showing that our build is 10 times faster (write a benchmark that uses strcpy, memset and friends heavily, which I’ve actually done, not to show off but to test if our changes are as beneficial as we’re hoping).

  13. benchmark on a framerate capped OpenGL test ? by stephanep · · Score: 2, Insightful

    In the last screen of the benchmark/demo, you see 4 different tests that are each one individually exactly at 60FPS +/1 FPS for the Linaro build and 30FPS +/- 1 for the stock build... Better not question the coincidence and make a slashdot article about that 100% speed improvement !

  14. Re:NEWS by Gaygirlie · · Score: 2

    You might wish to practice on your reading-comprehension skills: none of the things Linaro devs did are Pandaboard-specific.

  15. Re:battery life by Bill+Barth · · Score: 3, Interesting

    That's not guaranteed at all. The power consumption of a CPU is a function of a huge variety of things. It's possible that while the run time is shorter, the power draw is higher--possibly more than proportionally higher.

    --
    Yes...I am a rocket scientist.
  16. Re:battery life by amorsen · · Score: 5, Informative

    It's possible that while the run time is shorter, the power draw is higher--possibly more than proportionally higher.

    Possible, but very unlikely. Current processors are quite bad at running at "half power", i.e. if not all function units are running full speed they still waste power. The scheduling strategy "hurry up and wait" still tends to beat other strategies, because modern CPU's are so very good at saving power when idling. You would have to waste an enormous amount of power during the "hurry up" part of the strategy to not win in the end during the "wait" phase.

    In a few years this may change, as systems get better at handling partial load. If you could e.g. only keep the memory chips which are used by the current task awake, that would help quite a bit. Today it is AFAIK either all memory chips awake at once or all of them in power save mode. Software support would be fun, as the OS would have to try to keep the working set on as few memory chips as possible.

    --
    Finally! A year of moderation! Ready for 2019?
  17. Re:'mby up to 100 percent.'m by drkstr1 · · Score: 2

    100% as fast would be 1.0x. They said 100% faster, which is (x + 1.0x)

    --
    Fanboy Status: Apache Flex, C#, Eclipse, KDE, Pirate Party, Ron Paul, Slackware, Windows 7
  18. Re:next thing to do... by SuricouRaven · · Score: 2

    .net is the only time I've seen 'Hello, World' take thirty meg of of memory to run - not including the shared libraries. It's great if you want to get the programming done fast and in a way that minimises the number of mistakes the programmers will make, but the expense is greatly increased CPU and memory usage. Exactly what you don't want on a portable device.

  19. Re:next thing to do... by Miamicanes · · Score: 2

    > Does your Mustang manage frame drops on home screen on dual core 1GHz SoC? >100ms audio lag? >100ms input lag? Android does.

    Only if you run with stock CPU governor.

    For a quick & dirty experiment to show what your phone is genuinely capable of if you were to root it and reflash with a kernel that supports a governor based on the 'interactive' strategy, try this: root your phone, then install SetCPU. Choose 'performance', which forces the phone to run at max speed. Keep in mind that with most stock kernels, you're still running single-core at this point. Nevertheless, compare your experience to what you normally see. Beware: it's very, VERY hard to letting any CPU governor run once you've gotten spoiled by 'performance' mode. But you'll have to, because performance mode will nuke most batteries in an hour or two.

    I have three Android phones: a HTC Hero (CDMA), a Samsung Epic4G (Galaxy S), and a Motorola Photon. The Hero, overclocked and locked to ~711MHz, feels smoother and faster than my allegedly 1-GHz dual-core Photon. Graffiti input is flawless and error-free. On my Photon, I can hardly ever enter 10+ consecutive characters without recognition errors, partly because Motorola's stock kernel (which the bastards won't allow me to modify) thrashes the CPU speed all over the place (but mostly down) and confuses the hell out of Graffiti. It's really sad that a 16Mhz Palm Pilot circa 1997 could achieve nearly 100% accuracy, but a phone that's nominally 62.5 times faster can barely tell the difference between 'C' and "O". Locking the Photon's CPU to 100% (the one thing Moto's kernel grudgingly permits) fixes the problem totally. At least, until the battery dies an hour or two later.

    I wish Google would find a way to force anybody who wants to sell a phone with Android Market (oops, I mean "Google Play". God, I hate that name...) to include a CPU governor based on 'interactive'. What differentiates 'interactive' from 'ondemand' (the one, and often the only, governor in most stock kernels)? Interactive kicks the CPU up to 100% speed whenever you do something that indicates that you're interacting with the phone... when you've hit the power button to turn on the screen and wake up the phone, when you're touching the screen or pressing a button, etc. It also increases CPU speed rapidly in response to load, and backs off on speed VERY slowly. The goal of 'interactive' scheduling is that you should never be forced to wait for anything to happen just because the CPU is running at less than full speed. It allows it to slow down when the phone is genuinely inactive, but prioritizes snappiness and lag-free use over a few minutes of battery life.

    In contrast, the stock 'ondemand' governor hesitates to increase speed, and slows down the phone at the first hint of an excuse. Ondemand governors are the reason why we have phones with laggy lockscreens and lurching homescreen animations. The truth is, 99% of the lag complaints people have with Android are the fault of the 'ondemand' governor and its derivatives. Governors based on 'interactive' provide a MUCH nicer user experience, with minimal impact on battery life (the phone can still slow down to 100-200MHz when you turn off the display, or when it's just sitting on your homescreen and you haven't touched it in 5 minutes). 'Ondemand' == "evil".

  20. Re:next thing to do... by SuperDre · · Score: 2

    And the guys over at Xamarin proved that, it ran much MUCH faster.. http://blog.xamarin.com/2012/05/01/android-in-c-sharp/