Tremendous Speed-Up with SQL Transactions

The function CustomerDatabase::importCustomers reads 500 customers from the list c_customers, creates an SQL query cmd for each customer and inserts each customer into the Customers table of the SQL database db. void CustomerDatabase::importCustomers() { auto db = QSqlDatabase::database("CustomerDB"); for (auto row : c_customers) { auto cmd = QString{"INSERT INTO Customers " "(fullName, street, postalCode, city,...

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....

Scroll to top