Rant On Mobile Performance

This post is a bit off-topic, because it doesn’t have anything to do with the game (btw. I added one more new creature today), but I just wanted to stack some hard facts against one particularly annoying myth that seems to be flooding the internet.

The myth is that mobile CPUs will soon catch up with desktop processors, and that with all the new quad-core ARM chips out there, they are not too far from pulling that off. After all, high end desktops also have quad-core CPUs, so how much difference can there be?

Somehow, by evil force of marketing, number of cores has become the sole measuring stick for CPU “goodness”. A quad must be better than a dual, and dual better than single. Desktops have quad cores, mobiles have quad cores, they must be close in performance.

This is so wrong I don’t even know where to start. Mobile CPUs performance is far behind desktop CPUs.

When I was recently doing an optimization pass on some math code in Survivalcraft, I actually benchmarked stuff both on my PC and several different mobile devices. Including a Nexus 7, which has a (marketing-friendly) quad core Tegra 3 chip.

For instance, let’s take a matrix decomposition operation (any other would do). Here’s the “shocking” result:

Time to do 100,000 matrix decompositions (single threaded):

  • Nexus 7: 422ms
  • Intel i5 3570: 13ms

My PC is 32 times faster.

(Actually, it’s a couple of times faster than this, because my x86 code does not use SSE, but let’s ignore that)

We don’t need to compare Nexus to the newest desktop processor. Let’s take a Pentium 4, which is a really prehistoric CPU that was first released some 12 years ago, around when Windows 98 ruled the desktops and dinosaurs were still roaming the young Earth.

According to www.cpu-world.com, Pentium 4 is about 4 times slower clock for clock than my i5, and its clock speed was half of the i5. So, altogether it’s roughly 8 times slower when single threaded.  That’s a lot.

But it would still decompose matrices full 4 times faster than Nexus 7 (again, ignoring SSE that would make it even faster).

Would you want to make your Nexus 7 four times faster? The desktops were there 12 years ago.

You may point out that Nexus has 4 cores, while Pentium had only one. So their performance would actually be quite close.

This is a fallacy. Perhaps an artificial benchmark could be made that fully loaded all 4 Tegra cores with matrix operations, but I am sure the bottleneck would move from CPU to caches and memory, power throttling  would kick in, and as a result the performance would be nowhere near 4 times singlethreaded.

But anyway, artificial benchmarks is not what counts. It’s the real life performance that does. And there, single thread oomph rules. It’s very difficult to parallelize a non-trivial, real-life application to efficiently use many threads. It’s even more difficult on mobile platforms, where apps are simpler and can’t rely on always running on efficient multicore hardware.

So, the old Pentium 4 would eat Nexus 7 for breakfast. Actually, probably even Pentium 3 would do. That was released 14 years ago.

So much for anyone who thinks that mobile chips will soon catch up with desktops.

Yes, in 14 years there may be a mobile phone that runs as fast as todays i5. By then, desktops will be lightyears ahead.

Rant end.

About these ads

50 Comments

  1. Laurens
    Posted February 28, 2013 at 15:17 | Permalink | Reply

    agreed. especially considering limitations to the ARM architecture, and the fact that you cannot easily cool a phone’s processor. there’s no way to fit a fan or liquid cooling system into a phone.

  2. SCRAFTER
    Posted February 28, 2013 at 15:21 | Permalink | Reply

    nice article, even if i know all of this :)

    what u think about tegra 4 kaalus?

  3. MadWombat
    Posted February 28, 2013 at 15:21 | Permalink | Reply

    If i would use facebook, you would get the biggest possible ‘like’ for your rant!!! Great statement!!!!

    • wade
      Posted February 28, 2013 at 17:48 | Permalink | Reply

      which in the end is just a single regular like :P

  4. Posted February 28, 2013 at 15:30 | Permalink | Reply

    To me that is common sense. Thanks for agreeing. Sharon

  5. jriot10
    Posted February 28, 2013 at 15:33 | Permalink | Reply

    My quad core approximately 1.5 ghz galaxy note 2 only gets 343 ms. It must not be as fast as I thought then.

  6. Laurens
    Posted February 28, 2013 at 15:36 | Permalink | Reply

    1 thing to note, though, for the GPU, the resolution of phone screens is lower,so in a way, this could be faster.
    not by a lot of course. There’s also how Android manages multitasking and quits other apps in the background to make the current one run faster, and phones not having hundreds of drivers, antivirus software and necessary rubbish running that also sort-of increases performance.

    But if someone expects it would ever beat a PC, then no. We do have lower expectations for phones, however, making them “seem” better.

  7. Posted February 28, 2013 at 15:50 | Permalink | Reply

    I am a kid(seriously)
    And i have no idea what ur talking about(no offense)

    • epicdriv
      Posted February 28, 2013 at 15:58 | Permalink | Reply

      So I am 15 in march I think that classes as a kid lol

    • Cooperdan
      Posted February 28, 2013 at 16:30 | Permalink | Reply

      In simple terms the component that is the brain (processor) of the nexus 7 today isn’t as powerful as the brain of a computer (processor) made around 15 years ago

      • SCpro
        Posted February 28, 2013 at 18:46 | Permalink | Reply

        I’m 10 years old and I got that.

        • jason
          Posted February 28, 2013 at 22:19 | Permalink

          I’m 12 almost I don’t understand that

        • jriot10
          Posted February 28, 2013 at 23:19 | Permalink

          Let’s just say we are all on a different basis for understanding technology. Im 14 and i understood that perfectly, however my mom who is way older would not understand it at all.

        • LuvSurvivalGames
          Posted February 28, 2013 at 23:19 | Permalink

          I’m 9 so still I do get some of it and love it lol not lieing I’m 9

      • Posted February 28, 2013 at 23:48 | Permalink | Reply

        i understood that but i am not telling my age lol

  8. epicdriv
    Posted February 28, 2013 at 15:55 | Permalink | Reply

    Yeh I agree because we can’t exactly run even windows 98 on say nexus 7 (I have one) if this was TRUE why are they still making big ass towers if you can make one 50x smaller and cheaper.
    I dunno noobs on da internet lol.
    Anyway thanks kaalus for pointing that out. Nice to know someones knows the figures

  9. kuhy
    Posted February 28, 2013 at 16:20 | Permalink | Reply

    Please answer!!! Kaalus, do you plan sc on ubuntu phone?

    • Nicolas
      Posted February 28, 2013 at 17:15 | Permalink | Reply

      I want it too, but ubuntu didn’t came yet, only for galaxy nexus i think, and this doesn’t have a app store yet…

    • Posted February 28, 2013 at 17:25 | Permalink | Reply

      If there is enough devices out there, they have a robust app store and I don’t have to spend months making the game compatible with their system, why not?

      • kuhy
        Posted March 1, 2013 at 08:35 | Permalink | Reply

        Thanks for answer. :-)

  10. Cooperdan
    Posted February 28, 2013 at 16:20 | Permalink | Reply

    This is why most peoples suggestions can’t be used… Because of the mobile processor…. I remember when I suggested (what I thought was a simple idea) Raise the water levels in areas where it rains, but even that idea was rejected on the grounds of performance

  11. zach
    Posted February 28, 2013 at 16:48 | Permalink | Reply

    I think my IQ went up after I read this.

    • zach
      Posted February 28, 2013 at 16:51 | Permalink | Reply

      But I know what he’s saying. (I’m 16)

  12. lzm956902416
    Posted February 28, 2013 at 17:02 | Permalink | Reply

    good article, looking forward to 1.21!!!

  13. Brandon
    Posted February 28, 2013 at 17:12 | Permalink | Reply

    No kidding. But if you have a dedicated GPU, your performance would be using the most out of that for your results, just saying. But that is like saying a Nvidia 650 GT is exactly the same as a Nvidia 650M GT, the mobile GPU is worse.

  14. Nicolas
    Posted February 28, 2013 at 17:17 | Permalink | Reply

    Nokia from 98 is more faster than my note hahahaha, anything it’s better than my notebook, even my java samsung corby xD, if i try to play tibia will laggg…
    But i have a PC ‘-’

  15. cr4fterpro
    Posted February 28, 2013 at 18:11 | Permalink | Reply

    Kaalus, what about ipad.. So ipad vs nexus, witch is fastest and is it this coming on ios

    • Nicolas
      Posted February 28, 2013 at 22:15 | Permalink | Reply

      I think android > ios
      But i read performance of ios in games is better than android…

      • just a request
        Posted February 28, 2013 at 23:15 | Permalink | Reply

        Android is good…..I use samsung galexy tablet 2, but that’s powered by android.

  16. K.night
    Posted February 28, 2013 at 18:45 | Permalink | Reply

    I wonder What the other animal is c:

  17. bar-tech
    Posted February 28, 2013 at 19:50 | Permalink | Reply

    I agree with you Kaalus but I’m still pretty impressed about smartphone games nowadays. Could you imagine some of leading smartphone games with best graphic out there running on Pentium 3 or 4 processor? I mean, the resolution of a smartphone isn’t so high like a PC but some games prove graphics better then some old PC games. The intergrated graphic chipset is working very well in smartphones ;)

  18. Runesten Grimeton
    Posted February 28, 2013 at 20:55 | Permalink | Reply

    Yes it really amazing how many people think that their little pocket phone is just as powerful as their desktop, o boy. [?]

    On Fri, Mar 1, 2013 at 1:12 AM, Survivalcraft

  19. lef206
    Posted February 28, 2013 at 20:58 | Permalink | Reply

    Awesome post. I’ve had this same discussion with so many people.

  20. Kevin
    Posted February 28, 2013 at 21:03 | Permalink | Reply

    I’ve never heard or seen people say this, the thought is crazy if phone were as powerful you could run all pc games record your screen while doing70+ other tasks

  21. joel
    Posted February 28, 2013 at 21:44 | Permalink | Reply

    Cool

  22. cool123199
    Posted February 28, 2013 at 22:10 | Permalink | Reply

    does anybody know how to record there android screen WITHOUT ROOT OR COMPUTER please.

    • jriot10
      Posted February 28, 2013 at 23:22 | Permalink | Reply

      I experimented with this but i found that the only way to record my screen was through the app Screencrast, which unfortunately for your case, requires a root. However i would recommend rooting your device if you are intent on recording onscreen video. If you do not want to root or you are afraid of harming your phone in any way then you can always look for other ways. If you have more questions on rooting you can email me at jriot10@gmail.com and i can see if i can help you out.

      • Alex
        Posted March 1, 2013 at 04:58 | Permalink | Reply

        I would like to do the same i have the sg3 which is top of the line obivously and can take screenshots without root but i cannot understand why we can’t do the same its only taking pictures of your screen every 50-10 times per second and then compiling them into a video i do understand absolutly all of the things kaalus is talking about and i am only 14 i began getting tech savy when i received my first smartphone which allowed me to download and edit files and helped me get to where i am today which is an athletic nerd(which is actually possible) i play football wrestling and basketball sometimes

  23. Duxk
    Posted February 28, 2013 at 22:26 | Permalink | Reply

    Kaalus you are a great developer and this post of yours really raised the bar of respect I have for you. It’d be interesting to see what you could do if you decided to develop a game of your own for Desktop PCs where there aren’t so many limitations.

  24. max
    Posted March 1, 2013 at 00:53 | Permalink | Reply

    I already knew this, but I’m curious still….
    What are the current limits of survivalcraft?

  25. Seth
    Posted March 1, 2013 at 00:56 | Permalink | Reply

    Does that mean sc for PC?!

  26. Seth
    Posted March 1, 2013 at 00:57 | Permalink | Reply

    pleeeeeeease!

  27. Dave
    Posted March 1, 2013 at 12:30 | Permalink | Reply

    Very true Kaalus. Glad you added this information for your supporters. There is a lot of unfounded rubbish that goes about the internet.

  28. Posted March 2, 2013 at 04:59 | Permalink | Reply

    Kaalus why don’t you make Survival Craft for iOS? I think it would sell like hot cakes considering the fact that people like Eden World.. Survival Craft is way better than Eden. So kaalus please just port it over to iOS. People would love it.

    • Alex
      Posted March 2, 2013 at 15:05 | Permalink | Reply

      It wouldn’t be that simple kaalus would have to spend months just getting the game to be able to be compatabl

      • Alex
        Posted March 2, 2013 at 15:08 | Permalink | Reply

        Compatable with i devices this because of the different operating systems and such. But also i like android more. :P

  29. Nicolas
    Posted March 2, 2013 at 17:23 | Permalink | Reply

    I read in a blog, wine will come for android to run windows apps
    And they said android could run CS, wow, halflife
    Im waiting… Hahaha i want to play at least slenderman in my android

  30. Quasidart
    Posted March 3, 2013 at 00:09 | Permalink | Reply

    When you first announced the Android version of SC, I remember you commenting that on the same hardware, you saw Android run much more slowly than WP7 — enough that your prior few months of performance optimizations were nice for WP7 but required for SC to run well on Android. Given that, I’m curious: how does a WP8 device do in the test above? (It still won’t compare to an actual PC, of course; I’m just wondering if there’s any notable difference.) Or, is that test close enough to the hardware to minimize differences from the OS?

  31. Stryder
    Posted March 18, 2013 at 11:42 | Permalink | Reply

    I agree with this post, but on another note, why do you still bother with making the game run on way older phones that can barely run the game anyway? I think you spend too much time fixing bugs on phones that shouldn’t really be running the game anyway, it means we don’t get to see a lot of the updates because of the time you spend on this, just my two cents worth anyway.

Leave a Reply. No swearing please.

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 11,521 other followers