Beagle Bone: Bonescript Vs Perl Vs Python.

In a previous post I claimed that perl was much faster than python and bonescript at the classic led hello world blink test. I made this claim based on how fast the LED looked like it was blinking, but I thought I should actually do the test and make sure!

I knocked up some quick LED blinking scripts, hooked up my scope and put it to the test – with some interesting results:

Python Script: 44Hz

Bonescript: 1.9kHz

Perl: 3.2Khz.

*Disclaimer* The Scripts that I used weren’t code optimised, and they use the GPIO file interface.

Share
Tagged with: , , , , ,
Posted in Beagle Bone, Guides, OSHW






2 Comments » for Beagle Bone: Bonescript Vs Perl Vs Python.
  1. PJRestrepo says:

    Do I understand you correctly? Do you mean 44Hz, not 4.4kHz? So, for your tests, Perl is 72 times faster than Python, and Bonescript is 32 times faster?

  2. Paul Rickard says:

    I’m not sure what you mean, but to reiterate: (This time all in Hz)

    Python Script: 44Hz

    Bonescript: 1900Hz

    Perl: 3200Hz

    Also keep in mind this is one specific kind of test, I’m sure that each has its own pro’s and con’s.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>