Hard float VS soft float with Slackware ARM on the RPi 3

I recently bought a new Raspberry Pi 3 and installed Slackware ARM current (hard float) on it. My goal was to compare the performance of the hard float port against Slackware ARM 14.2 (soft float), which is currently powering this RPi3 hosted website.

As before, my tests are solely focused on tasks relating to performance with Apache/PHP, MySQL and OpenSSL. For the record, these results should not be perceived as irrefutable scientific proof ;-)

There are minor differences between the two Slackware installations, but I don’t believe that will make much of a difference with the tests I’m running. I’ve migrated my configuration files from 14.2 to Slackware current so the setup is as identical as can be.

All tests were performed by executing each task 15 times and calculating the average result.

Slackware 14.2Slackware Current
Software floating pointHardware floating point
Apache 2.4.27Apache 2.4.27
MariaDB 10.0.31MariaDB 10.0.32
PHP 5.6.31PHP 5.6.31
OpenSSL 1.0.2kOpenSSL 1.0.2l
Kernel 4.9.xKernel 4.9.x
MicroSDHC Ultra UHS-IMicroSDHC Ultra UHS-I

PHP performance:

To keep it simple I’m letting my WordPress caching engine calculate and display the time spent to create cached versions of dynamic pages. Below are the average values generated per installation for my Slackware 14.2 review page:

# Soft float
/** Dynamic page generated in 1.7012 seconds. */

# Hard float
/** Dynamic page generated in 1.4891 seconds. */

I’m writing this down as a 12.47% decrease in execution time for PHP scripts with the hard float.

MySQL performance:

I’m simply relaying on the BENCHMARK() function with this test. Here are the average values generated:

# Soft float
SELECT BENCHMARK(1000000,ENCODE('praise','bob'));
+-------------------------------------------+
| BENCHMARK(1000000,ENCODE('praise','bob')) |
+-------------------------------------------+
|                                         0 |
+-------------------------------------------+
1 row in set (3.03 sec)

# Hard float
SELECT BENCHMARK(1000000,ENCODE('praise','bob'));
+-------------------------------------------+
| BENCHMARK(1000000,ENCODE('praise','bob')) |
+-------------------------------------------+
|                                         0 |
+-------------------------------------------+
1 row in set (1.02 sec)

I’m writing this down as a 66.34% decrease in query execution times for the hard float.

OpenSSL performance:

# Soft float
$ openssl speed rsa2048 rsa4096

                  sign    verify    sign/s verify/s
rsa 2048 bits 0.025189s 0.000675s     39.7   1482.2
rsa 4096 bits 0.172373s 0.002566s      5.8    389.7

# Hard float
$ openssl speed rsa2048 rsa4096

                  sign    verify    sign/s verify/s
rsa 2048 bits 0.018764s 0.000477s     53.3   2097.9
rsa 4096 bits 0.124198s 0.001783s      8.1    561.0

Based on this test, the hard float offers improvements in the range of 25% to 44% compared to the soft float.

In short, the hard float port does not only shine with multimedia content but it also provides some impressive gains for your lamp stack. I’m officially excited for the next stable Slackware ARM release.

Roger Comply avatar
Roger Comply
Thank you for reading!
Feel free to waste more time by subscribing to my RSS feed.