qt5_performance_book (@BookQt5) header
qt5_performance_book (@BookQt5) profile picture

A book about C++ and Qt-5 performance techniques by @mrkkrj, published in Jan. 2019: https://teapawt.net/t.co/qaiOjUEpu2….

Joined March 2020
Photo by qt5_performance_book (@BookQt5)Photo by qt5_performance_book (@BookQt5)Photo by qt5_performance_book (@BookQt5)Photo by qt5_performance_book (@BookQt5)Photo by qt5_performance_book (@BookQt5)Photo by qt5_performance_book (@BookQt5)Photo by qt5_performance_book (@BookQt5)Photo by qt5_performance_book (@BookQt5)Photo by qt5_performance_book (@BookQt5)Photo by qt5_performance_book (@BookQt5)
Some good reviews 🥳 here:
1
2
We touched upon that in the book, but for the UI that's normally not that important. But if you are curious, here its is: branch prediction deep dive.
A detailed discussion of branch prediction and performance - because in that industry: "For low-latency systems, a branch miss rate over 1% should raise alarms, and sub-0.5% is ideal for ultra-low-latency paths." 😮 #cpp #cplusplus #performance johnfarrier.com/branch-predi…
57
qt5_performance_book retweeted
C++ Insights - Episode 57: More performance thanks to more implicit moves in C++20 In this episode, you learn about a change in the standard that can give you more performance, thanks to the implicit move. youtu.be/3CR1ow5BfJM #cppinsights #cpp
6
1
13
1,257
qt5_performance_book retweeted
CPU vs FPGA - what an easy and well explanation in 25 seconds
23
590
29
4,224
304,499
qt5_performance_book retweeted
Redis is data structure store that can be used as a database, cache, and message broker. It is used by a wide range of major corporations. Recently, Redis has adopted our library (fast_float) and they report a substantial performance boost (30%).
6
18
361
20,398
qt5_performance_book retweeted
2
1
14
1,917
"Optimizing compilers may turn your conventional code into a table lookup. For example, a switch-case is sometimes compiled to a small table ... what appears like a branch (if-else) might be compiled to conditional move instructions or even to a table. - as discussed in the book
1
74
There are also some new text features like dynamic font support with variable axes (e.g. wght, wdth and ital in the image below). #Qt6_7 qt.io/blog/text-improvements…
18
Support for Google Protocol Buffers has been recently (Qt 6.7) added to Qt as QtGrpc module: 👍 doc.qt.io/qt-6/qtgrpc-index.…
12
An allocator story in embedded context:
More of the musl+alpine story: the allocators (a long time favourites of mine, BTW...) -> "It is known that some memory allocation patterns lead to bad performance with the new hardened malloc. However, the security benefits ... to some extent justifies the performance costs"
1
20
"C++ templ library for high perf. SIMD based sorting routines for built-in integers, floats... and custom defined C++ objects... accelerated using AVX-512/AVX2 when available ... library auto picks the best version depending on the processor it is run on" github.com/intel/x86-simd-so…
1
111
"Toward the end of last year Intel quietly made available x86-simd-sort via their GitHub account. It's a C++ header file library for high performance SIMD sorting though in its current form is just focused on an AVX-512 quicksort implementation."
37
qt5_performance_book retweeted
Rolling your own fast matrix multiplication: loop order and vectorization If you must multiply matrices, you should use dedicated libraries. However, we sometimes need to roll our own code. In C++, you can quickly write your own Matrix template: How do you implement a matrix multiplication? A matrix multiplication is a sequence of three loops. If you do not want to get fancy, you have therefore six possibilities: If you use an optimizing compiler and you tell it to compile specifically for your processor, you should get some fast code, at least in some instances. Which order is best? The exact result depends on your data type (double, float, int), on the size of the matrices, on your compiler and your hardware. I wrote a benchmark where I use 100 by 100 matrices containing double values. I use GCC 12 (with full optimization -O3) and an Intel Ice Lake processor. I tell the compiler to optimize for the exact processor I have thus I expect that it will use advanced AVX-512 instructions when possible. The net result in my experiment is that the best ordering is ijk or ikj. That is, the textbook order (ijk) is one of the best. The worst ordering is jik. If you were to compute manually and naively the matrix multiplications, you would need to do 100 times 100 times 100 multiplications, so 1 million multiplications and 1 million additions. Interestingly, the best orderings (ikj and ijk) use roughly a quarter of a million of instructions to load the data, do the multiplications, the additions and storing the data.
10
26
209
20,646
qt5_performance_book retweeted
Join Till Adam, CCO of @KDABQt, and Christoph Hennersperger, co-founder of Luma Vision, as they explore building advanced medical imaging solutions with Qt. Full presentation here: hubs.li/Q02B3W730 #Healthcare #MedTech #MedicalImaging #MedicalTechnology #MedicalDevice
1
2
11
1,002
qt5_performance_book retweeted
Replying to @lemire
If you have good performance oriented architecture design, you have less hot spots to optimize. If not, then you run into death by thousand cuts problem. After fixing a few critical issues, everything starts to look like a hotspot, so you have to rewrite everything.
3
21
3,204
qt5_performance_book retweeted
"And that explain why companies do full rewrites of their code for performance: the effort needed to squeeze more performance from the existing code becomes too much and a __complete rewrite is cheaper__."
Hotspot performance engineering fails: Developers often believe that software performance follows a Pareto distribution: 80% of the running time is spent in 20% of the code. Using this model, you can write most of your code without any care for performance and focus on the narrow pieces of code that are performance sensitive. This is wrong, empirically so. The more you optimize, the more code you must consider. It is relatively easy to double the performance of an unoptimized piece of code, but much harder to multiply it by 10. You quickly hit walls that can be unsurmountable: the effort needed to double the performance again would just be too much. In effect, we have a long tail effect: though there are clearly easy wins, much of the work lies in the ‘tail’. And that explain why companies do full rewrites of their code for performance: the effort needed to squeeze more performance from the existing code becomes too much and a complete rewrite is cheaper. It also means that you should be acutely concerned about performance when you design your software if you want to avoid a rewrite.
1
1
144