I would like to know whether the distro impacts the performance of the OS in pure terminal mode. I plan to run computationally power consuming algorithms with it and hence I would like to get the best out of its performance...
It depends on the computation and the OS, and less on the terminal. The RPI-3 is ARMv8/Aarch64. ARMv8 is 64-bit, so it can be more efficient than earlier models of the Raspberry Pi.
ARMv8/Aarch64 also has two (maybe more) useful instructions: pmull
and pmull2
. They perform 64x64 → 128-bit carryless multiplies. The multiplier can be used in a larger multiplier that improves speed in some context by 30%. Additional instructions include hardware acceleration for CRC, AES, SHA1 and SHA2.
The OS image provided by the Raspberry project does not utilize or expose the ARMv8 instructions; and the toolchain is not capable of compiling programs which take advantage of the instructions (even though Aarch32 executions environments on Aarch64 are completely valid). Also see Enable crc32 for armv7? on the GCC help mailing list.
Raspbian, Ubuntu MATE and ArchLinux...
I think you should make ARMv8/AArch64 a priority in your quest. Unfortunately, I don't believe you will find a 64-bit OS from Ubuntu or ArchLinux. My apologies if its bike shedding.
The CentOS ARM folks are getting ready to investigate the feasibility of a 64-bit OS image for the device. Also see Raspberry Pi 3 and Aarch64 image? on the ARM-dev mailing list.
You can see some of the cpu features by inspecting /proc/cpuinfo
. Notice its missing:
$ cat /proc/cpuinfo
processor : 0
model name : ARMv7 Processor rev 4 (v7l)
BogoMIPS : 38.40
Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x0
CPU part : 0xd03
CPU revision : 4
...
Hardware : BCM2709
Revision : a22082
Serial : 00000000e7ffc20d
Notice its missing flags like pmull
and pmull2
. Surprisingly, it includes crc32
(because its an ARMv8 extension).
I know the Broadcom SoC can consume the instructions because I wrote a program that tested the instructions. The program simply emitted the byte codes for the instructions, and the compiler could not stop me from using them :)
If interested, here's what it would look like. If you compile it with -march=armv7-a -mfpu=neon
and the run it, then you will notice it does not die with an illegal instruction and it returns 0 as expected.
$ cat ../test.cc
#include <arm_neon.h>
int main(int argc, char* argv[])
{
__asm__ __volatile__
(
#ifndef __aarch64__
".code 32"
#endif
// PMULL
".byte 0x0e, 0xe1, 0xe0, 0x00;\n"
// PMULL2
".byte 0x4e, 0xe1, 0xe0, 0x00;\n"
...
: : : "cc", "d0", "d1", "d2", "q0", "q1", "q2"
);
return 0;
}