efficiency

CppCon 2015 Implementation of a component-based entity system in modern C++--Vittorio Romeo

Have you registered for CppCon 2016 in September? Don’t delay – Early Bird registration is open now.

While we wait for this year’s event, we’re featuring videos of some of the 100+ talks from CppCon 2015 for you to enjoy. Here is today’s feature:

Implementation of a component-based entity system in modern C++

by Vittorio Romeo

(watch on YouTube) (watch on Channel 9)

Summary of the talk:

An alternative to deep inheritance trees for game and application architecture design is "composition". Separating data (in independent components) from logic (in independent systems) allows the code to be more reusable and more efficient, alongside additional benefits. Using modern C++11 and C++14 features, it is possible to design an efficient and user-friendly component-based entity system library, with intuitive syntax and convenient cost-free abstractions.

Introducing a new, advanced Visual C++ code optimizer--Gratian Lup

Visual C++ compiler evolves again:

Introducing a new, advanced Visual C++ code optimizer

by Gratian Lup

From the article:

We are excited to announce the preview release of a new, advanced code optimizer for the Visual C++ compiler backend. It provides many improvements for both code size and performance, bringing the optimizer to a new standard of quality expected from a modern native compiler.

This is the first public release and we are encouraging people to try it and provide suggestions and feedback about potential bugs. The official release of the new optimizer is expected to be Visual Studio Update 3, while the release available today is unsupported and mostly for testing purposes...

CppCon 2015 Better Code: Data Structures--Sean Parent

Have you registered for CppCon 2016 in September? Don’t delay – Early Bird registration is open now.

While we wait for this year’s event, we’re featuring videos of some of the 100+ talks from CppCon 2015 for you to enjoy. Here is today’s feature:

Better Code: Data Structures

by Sean Parent

(watch on YouTube) (watch on Channel 9)

Summary of the talk:

The standard library containers are often both misused and underused. Instead of creating new containers, applications are often structured with incidental data structures composed of objects referencing other object. This talk looks at some of the ways the standard containers can be better utilized and how creating (or using non-standard library) containers can greatly simplify code. The goal is no incidental data structures.

Fast incremental sort -- Lars Hagen

Lars Hagen describes in his blog post a strategy to solve the problem of a fast incremental sort.

Fast incremental sort

by Lars Hagen

From the article

I recently came across the need for an incremental sorting algorithm, and started to wonder how to do it optimally.

The incremental sorting problem is described here, and is an “online” version of partial sort. That is, if you have already sorted kk elements, you should be able to quickly sort k+1k+1 elements, and so on.

Incremental sorts can be useful for a number of cases:

  • You want sorted items, but you don’t know how many elements you’ll need. This could often happen when you are filtering the resulting sequence, and you don’t know how many items will be filtered out.
  • You are streaming the sequence, so even though you want the whole sequence, you want the first elements as quickly as possible.

We’ll see how branch misprediction and other constant factors can make the naive asymptotically optimal version far slower than a practical implementation.

Cheerp PreExecuter: compile-time evaluation of constructors--Sander Mathijs van Veen

An advancement in the world of C++ to javascript:

Cheerp PreExecuter: compile-time evaluation of constructors

by Sander Mathijs van Veen

From the article:

The size of a JavaScript web application, especially when compiled from a complex C++ source, has a key role on the quality of the user experience, being directly connected to the download and startup time. Size also has a big impact on the traffic and bandwidth needs of the hosting server, which translates one to one into costs. Therefore, minimizing the size of JavaScript applications compiled from C++ with Cheerp has always been one of our priorities...

Searching and replacing in strings with boost

My series on building applications with Qt an boost continues:

Searching and replacing in strings with boost

by Jens Weller

From the article:

The next big milestone for my CMS is to actually generate HTML files, and I'm almost there. I'll reach it in the next two weeks, most code is written, just a little bit of refactoring is needed. This blog post is about searching and replacing in strings. As I started last week with implementing the functionality, that turns the data in my CMS into an HTML website.

There needs to be a lot of text transformed, in order to turn a shared structure like a cross page layout into a single, special HTML file, one of those transformations is, to replace the internal links with the correct links. A link to a different page in the same website cannot be represented as a text link, instead it is represented by a linkid, which corresponds to the Page it points to. This is to have still the correct link, if the page is renamed or moved...