Skip to content

Blog

CMake Cross-Compilation Based on Yocto SDK

We have succeeded in building embedded Linux with Yocto for a quad-core NXP i.MX6 (ARM Cortex-A9). Next, we want to cross-compile our own Qt application. As we use CMake for building our Qt application, we must create a CMake toolchain file. I am going to give a line-line by line explanation of the CMake toolchain file. I used Yocto Morty and CMake v3.5.1 (as it comes with Ubuntu 16.04 LTS).
Read More »CMake Cross-Compilation Based on Yocto SDK

30% Faster Startup Thanks to QtQuick Compiler

Update: Since Qt 5.12, the QtQuick compiler has been available under LGPLv3. Even if you don’t have a commercial Qt license, you will be able to enjoy a significantly faster startup of embedded QML applications.

It is not easy to find hard data about how much the QtQuick compiler can speed up the startup of real-life application. As I had some time on my hands this weekend, I measured the startup times of the HMI of a maize harvester running on a quad-core NXP/Freescale i.MX6 (Nit6Q_W_BCOM). Using the QtQuick compiler from Qt 5.7 brings the startup time from 2.72s down to 1.91s – a speedup of 30%!
Read More »30% Faster Startup Thanks to QtQuick Compiler

Finding Projects as a Freelance Software Developer

Three years ago aged 45, I started as a freelance software developer in Southern Germany. It were three pretty amazing years. I had paid work for 522.5 days of 750 working days, which amounts to nearly 70% of total working days. My hourly rate was roughly 94 Euros with 8 hours per day. Additionally, I passed on 285 days of work to other developers at a rate of 61 Euros. Despite this success, finding projects still feels a bit like black magic. Sometimes I could have got three projects at the same time. Sometimes I struggled for several months to find the next project. I want to share my experience in finding projects: what worked for me and what didn’t.
Read More »Finding Projects as a Freelance Software Developer

Best Friends: C++11 Move Semantics and Pimpl

Move semantics is faster than copy semantics, when the compiler can replace expensive copy operations by cheaper move operations, that is, when it can replace a deep copy of a big object by a shallow copy of the pointer to the big object. Hence, classes using the pimpl idiom in combination with move semantics should see a considerable speed-up. As Qt applies the pimpl idiom consistently to every non-trivial Qt class, we should see a speed-up by simply using Qt classes instead of their STL counterparts. I’ll compare the performance of classes that use move semantics with Qt and STL classes with and without applying the pimpl idiom.
Read More »Best Friends: C++11 Move Semantics and Pimpl

Performance Gains Through C++11 Move Semantics

We explore when and how our code benefits most from equipping classes with move constructors and assignment operators. We analyse in detail, which constructors and assignment operators (move or copy) are called for C++98 and C++11 when we insert or emplace objects into containers, when we initialise containers and when we shuffle and sort containers. Finally, we run benchmarks for these operations and discuss the actual speed-up, which ranges from 1% to 70%.
Read More »Performance Gains Through C++11 Move Semantics

Simplifying Loops with C++11 in Qt Ways

Recently, I looked through the code base of a medium-sized project to see how I could simplify handwritten for-loops by using C++11’s new range-based for and STL algorithms with lambda expressions. The results in short: Range-based for makes loops simpler, easier to understand and often faster. STL algorithms are often a bit harder to read and write than range-based for loops, because lambda expressions are pretty clumsy, algorithm naming is inconsistent, and algorithm interfaces are inconvenient. But, they are still better than handwritten for-loops.
Read More »Simplifying Loops with C++11 in Qt Ways