{"id":3079,"date":"2012-10-10T14:13:47","date_gmt":"2012-10-10T13:13:47","guid":{"rendered":"http:\/\/www.walkingrandomly.com\/?p=3079"},"modified":"2012-10-10T14:13:47","modified_gmt":"2012-10-10T13:13:47","slug":"new-android-benchmark-how-many-flops-can-your-phone-really-do","status":"publish","type":"post","link":"https:\/\/walkingrandomly.com\/?p=3079","title":{"rendered":"New Android Benchmark: How many flops can your phone REALLY do"},"content":{"rendered":"<p>There are <a href=\"http:\/\/www.techhive.com\/article\/255977\/how_to_benchmark_your_android_device.html\">many ways to benchmark an Android device<\/a> but the one I have always been most interested in is the <a href=\"https:\/\/play.google.com\/store\/apps\/details?id=com.greenecomputing.linpack&amp;hl=en\">Linpack for android<\/a> benchmark by GreeneComputing.\u00a0 The <a href=\"http:\/\/en.wikipedia.org\/wiki\/LINPACK_benchmarks\">Linpack benchmarks<\/a> have been used for many years by supercomputer builders to compare computational muscle and they form the basis of the <a href=\"http:\/\/en.wikipedia.org\/wiki\/Top500\">Top 500<\/a> list of supercomputers.<\/p>\n<p>Linpack measures how quickly a machine can solve a dense n by n <em><\/em> <a title=\"System of linear equations\" href=\"http:\/\/en.wikipedia.org\/wiki\/System_of_linear_equations\">system of linear equations<\/a><em> <\/em>which is a common task in scientific and engineering applications.\u00a0 The results of the benchmark are measured in <a href=\"http:\/\/en.wikipedia.org\/wiki\/FLOPS\">flops<\/a> which stands for floating point operations per second.\u00a0 A typical desktop PC might acheive around 50 gigaflops (50 billion flops) whereas the most powerful PCs on Earth are measured in terms of petaflops (<a href=\"http:\/\/en.wikipedia.org\/wiki\/Quadrillion\">Quadrillions<\/a> of flops) with the <a href=\"http:\/\/arstechnica.com\/information-technology\/2012\/06\/with-16-petaflops-and-1-6m-cores-doe-supercomputer-is-worlds-fastest\/\">current champion<\/a> weighing in at 16 petaflops, that&#8217;s 16,000,000,000,000,000 floating point operations per second&#8211;which is a lot!<\/p>\n<p>Acording to the Android Linpack benchmark, my Samsung Galaxy S2 is capable of 85 megaflops which is pretty powerful <a href=\"https:\/\/www.walkingrandomly.com\/?p=2684\">compared to supercomputers of bygone eras<\/a> but rather weedy by today&#8217;s standards.\u00a0 It turns out, however, that the Linpack for Android app is under-reporting what your phone is really capable of.\u00a0 As the authors say <em>&#8216;This test is more a reflection of the state of the Android Dalvik Virtual Machine than of the floating point performance of the underlying processor.&#8217;\u00a0\u00a0<\/em>It&#8217;s a nice way of comparing the speed of two phones, or different firmwares on the same phone, but does not measure the true performance potential of your device.Put another way, it&#8217;s like measuring how hard you can punch while wearing huge, soft boxing gloves.<\/p>\n<p>Rahul Garg, a PhD. student at McGill University, thought that it was high time to take the gloves off!<\/p>\n<p><strong>rgbench &#8211; a true high performance benchmark for android devices<\/strong><\/p>\n<p>Rahul has written a new benchmark app called <a href=\"https:\/\/play.google.com\/store\/apps\/details?id=org.codedivine.rgbench\">RgbenchMM<\/a> that aims to more accurately reflect the power of modern Android devices.\u00a0 It performs a different calculation to Linpack in that it meaures the speed of <a href=\"http:\/\/en.wikipedia.org\/wiki\/Matrix_multiplication\">matrix-matrix multiplication<\/a>, another common operation in sicentific computing.<\/p>\n<p>The benchmark was written using the <a href=\"http:\/\/developer.android.com\/tools\/sdk\/ndk\/index.html\">NDK (Native Development Kit)<\/a> which means that it runs directly on the device rather than on the Java Virtual Machine, thus avoiding Java overheads.\u00a0 Furthermore, Rahul has used HPC tricks such as tiling and <a href=\"http:\/\/en.wikipedia.org\/wiki\/Loop_unwinding\">loop unrolling<\/a> to squeeze out the very last drop of performance from your phone&#8217;s processor . The code tests about 50 different variations and the performance of the best version found for your device is then displayed.<\/p>\n<p>When I ran the app on my <strong>Samsung Galaxy S2<\/strong> I noted that it takes rather longer than Linpack for Android to execute &#8211; several minutes in fact &#8211; which is probably due to the large number of variations its trying out to see which is the best.\u00a0 I received the following results<\/p>\n<ul>\n<li>1 thread: 389 Mflops<\/li>\n<li>2 threads: 960 Mflops<\/li>\n<li>4 threads: 867.0 Mflops<\/li>\n<\/ul>\n<p>Since my phone has a dual core processor, I expected performance to be best for 2 threads and that&#8217;s exactly what I got. Almost a Gigaflop on a mobile phone is not bad going at all! For comparison, I get around 85 Mflops on Linpack for Android.\u00a0 Give it a try and see how your device compares.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.walkingrandomly.com\/images\/random\/RgbenchMM.png\" alt=\"Android MM benchmark\" \/><\/p>\n<p><strong>Links<\/strong><\/p>\n<ul>\n<li><a href=\"https:\/\/play.google.com\/store\/apps\/details?id=org.codedivine.rgbench\">RgbenchMM on GooglePlay<\/a><\/li>\n<li><a href=\"http:\/\/codedivine.org\/2012\/09\/25\/prelim-analysis-rgbenchmm\/\">Prelim Analysis of RgbenchMM<\/a> &#8211; Some of the in-depth details of the benchmark, written by the app&#8217;s author.<\/li>\n<li><a href=\"https:\/\/www.walkingrandomly.com\/?p=2684\">Supercomputers vs mobile phones<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>There are many ways to benchmark an Android device but the one I have always been most interested in is the Linpack for android benchmark by GreeneComputing.\u00a0 The Linpack benchmarks have been used for many years by supercomputer builders to compare computational muscle and they form the basis of the Top 500 list of supercomputers. [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[35,40,55],"tags":[],"class_list":["post-3079","post","type-post","status-publish","format-standard","hentry","category-android","category-free-software","category-mobile-mathematics"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p3swhs-NF","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=\/wp\/v2\/posts\/3079","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3079"}],"version-history":[{"count":17,"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=\/wp\/v2\/posts\/3079\/revisions"}],"predecessor-version":[{"id":4642,"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=\/wp\/v2\/posts\/3079\/revisions\/4642"}],"wp:attachment":[{"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3079"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3079"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3079"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}