{"id":9962,"date":"2013-09-23T20:14:20","date_gmt":"2013-09-24T00:14:20","guid":{"rendered":"http:\/\/scruss.com\/blog\/?p=9962"},"modified":"2014-03-13T22:47:27","modified_gmt":"2014-03-14T02:47:27","slug":"beaglebone-black-slow-as-a-dog","status":"publish","type":"post","link":"https:\/\/scruss.com\/blog\/2013\/09\/23\/beaglebone-black-slow-as-a-dog\/","title":{"rendered":"BeagleBone Black: slow as a dog"},"content":{"rendered":"<p>All benchmarks are artificial, but this one had me scratching my head. One hears\u00c2\u00a0 that the <a href=\"http:\/\/beagleboard.org\/Products\/BeagleBone%20Black\">BeagleBone Black<\/a> is screamingly fast compared to the <a href=\"http:\/\/www.raspberrypi.org\/\">Raspberry Pi<\/a>; faster, newer processor, blahdeblah, <em><abbr title=\"My Computer's Better Than Your Computer\">mcbtyc<\/abbr><\/em>, etc. I found the opposite is true.<\/p>\n<p>So I buy one at the exceptionally soggy <a href=\"http:\/\/makerfairetoronto.com\/\">Toronto Mini Maker Faire<\/a>. Props to the CircuitCo folks, they are easy to set up: just a mini-USB cable provides power and virtual network shell. And <a href=\"http:\/\/beagleboard.org\/Support\/BoneScript\">BoneScript<\/a> \u00e2\u20ac\u201d an Arduino-like JavaScript library \u00e2\u20ac\u201d is very clever indeed. But I need to see if this thing has any grunt, and so I need a benchmark.<\/p>\n<p>After <a href=\"http:\/\/www.metafilter.com\/132193\/014086614137814317017445022278413938600\">hearing about<\/a> the <a href=\"http:\/\/www.cs.utah.edu\/~aek\/code\/card.cpp\">business-card raytracer<\/a>, I thought it would be perfect. I compiled it on both machines with:<\/p>\n<pre>g++\u00c2\u00a0 -Ofast\u00c2\u00a0\u00c2\u00a0 card.cpp\u00c2\u00a0\u00c2\u00a0 -o card<\/pre>\n<p>and then ran it with:<\/p>\n<pre>time .\/card &gt; \/dev\/null<\/pre>\n<p>The results are \u00e2\u20ac\u00a6 <em>surprising<\/em>:<\/p>\n<ul>\n<li><strong>Raspberry Pi<\/strong>: 4&#8242; 15&#8243;<\/li>\n<li><strong>BeagleBone Black<\/strong>: 12&#8242; 39&#8243; \u00e2\u2020\u2019 3\u00c3\u2014 slower<\/li>\n<\/ul>\n<p>(In comparison, my i7 quad-core laptop runs it in 8\u00c2\u00bd seconds.)<\/p>\n<p>I don&#8217;t have any explanation why the BBB is so much slower. It&#8217;s almost as if the compiler isn&#8217;t fully optimizing under \u00c3\u2026ngstr\u00c3\u00b6m Linux.<\/p>\n<h3>Raspberry Pi: system info<\/h3>\n<pre>$ uname -a\r\nLinux rpi 3.6.11+ #538 PREEMPT Fri Aug 30 20:42:08 BST 2013 armv6l GNU\/Linux\r\n\r\n$ cat \/proc\/cpuinfo \r\nProcessor\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0 : ARMv6-compatible processor rev 7 (v6l)\r\nBogoMIPS\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0 : 697.95\r\nFeatures\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0 : swp half thumb fastmult vfp edsp java tls \r\nCPU implementer\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0 : 0x41\r\nCPU architecture: 7\r\nCPU variant\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0 : 0x0\r\nCPU part\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0 : 0xb76\r\nCPU revision\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0 : 7\r\n\r\nHardware\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0 : BCM2708\r\nRevision\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0 : 000f<\/pre>\n<h3>BeagleBone Black: system info<\/h3>\n<pre># uname -a\r\nLinux beaglebone 3.8.13 #1 SMP Tue Jun 18 02:11:09 EDT 2013 armv7l GNU\/Linux\r\n# cat \/proc\/cpuinfo \r\nprocessor\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0 : 0\r\nmodel name\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0 : ARMv7 Processor rev 2 (v7l)\r\nBogoMIPS\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0 : 297.40\r\nFeatures\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0 : swp half thumb fastmult vfp edsp thumbee neon vfpv3 tls \r\nCPU implementer\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0 : 0x41\r\nCPU architecture: 7\r\nCPU variant\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0 : 0x3\r\nCPU part\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0 : 0xc08\r\nCPU revision\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0 : 2\r\n\r\nHardware\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0 : Generic AM33XX (Flattened Device Tree)\r\nRevision\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0 : 0000<\/pre>\n<p>Both boards are running at stock speed.<\/p>\n<p><strong>Update<\/strong>: I&#8217;ve tried with an external power supply, and checked that the processor was running at full speed. It made no difference. I suspect that Raspbian enables armhf floating point by default, while \u00c3\u2026ngstr\u00c3\u00b6m needs to be told to use it.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>All benchmarks are artificial, but this one had me scratching my head. One hears\u00c2\u00a0 that the BeagleBone Black is screamingly fast compared to the Raspberry Pi; faster, newer processor, blahdeblah, mcbtyc, etc. I found the opposite is true. So I buy one at the exceptionally soggy Toronto Mini Maker Faire. Props to the CircuitCo folks, [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[7],"tags":[2723,2721,2563,2510,2722],"class_list":["post-9962","post","type-post","status-publish","format-standard","hentry","category-computers-suck","tag-beagleboneblack","tag-benchmark","tag-c","tag-raspberrypi","tag-raytracer"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/pQNZZ-2AG","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/posts\/9962","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/comments?post=9962"}],"version-history":[{"count":3,"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/posts\/9962\/revisions"}],"predecessor-version":[{"id":10518,"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/posts\/9962\/revisions\/10518"}],"wp:attachment":[{"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/media?parent=9962"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/categories?post=9962"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/tags?post=9962"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}