Languages
[Edit]
EN

CPU Benchmark - Raspberry PI vs Banana PI - single core speed test with Fibonacci Sequence

4 points
Created by:
Niac
478

In this short article, I would like to show the results of a simple CPU test made on Raspberry PI and Banana PI using Fibonacci Sequence, run on a single core.

Fibonacci sequence performance test on Raspberry PI, Banana PI, Ryzen 5900X
Fibonacci sequence performance test on Raspberry PI, Banana PI, Ryzen 5900X

Test result:

Computer NameCalculations Time [s]Operating SystemComputer Specification
Raspberry PI 2 B+234RaspbianHomepage
Raspberry PI 3 B+201RaspbianHomepage
Banana PI M3142RaspbianWiki
Ryzen 9 5900X2Windows 10 (x64)
Compiler: MSVC x64
Homepage

Note: smaller calculations time means the pc is faster
(e.g. Banana PI M3 is 1.65 times faster than Raspberry PI 2 B+ on single core computation)

Note: below tests were compiled with GCC (with disabled optimization).

Used test (program.cpp file):

//CPU test

#include <iostream>
#include <time.h>

int main()
{
    unsigned long tmp, a = 0, b = 1;

    //std::cout << a << std::endl;
    //std::cout << b << std::endl;

    std::cout << "Started!" << std::endl;

    time_t t1 = time(NULL);

    for (unsigned long i = 0uL; i < 10000uL; ++i)
    {
        for (unsigned long j = 0uL; j < 1000000uL; ++j)
        {
            tmp = b;
            b = a + b;
            a = tmp;

            //std::cout << b << std::endl;
        }
    }

    time_t t2 = time(NULL);
    time_t dt = t2 - t1;

    std::cout << "Finished!" << std::endl;

    std::cout << "Result: " << b << std::endl;
    std::cout << "Time: " << dt << "s" << std::endl;

    return 0;
}

Compilation:

g++ -o program program.cpp

# or:

gcc -o program program.cpp

Running

chmod a+x ./program
./program

 

See also

  1. CPU Benchmark - single core speed test with Fibonacci Sequence in JavaScript
  2. CPU Benchmark - single core speed test with Fibonacci Sequence in Java

  3. CPU Benchmark - single core speed test with Fibonacci Sequence in AssemblyScript

  4. CPU Benchmark - single core speed test with Fibonacci Sequence in Dart

  5. CPU Benchmark - single core speed test with Fibonacci Sequence in Python

  6. CPU Benchmark - single core speed test with Fibonacci Sequence in PHP

Alternative titles

  1. CPU Benchmark - Raspberry PI vs Banana PI - single core performance test with Fibonacci Sequence
Donate to Dirask
Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
Join to our subscribers to be up to date with content, news and offers.
Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join