[Bf-committers] Efficient generic data structures for Blender?

Stefan Werner stewreo at gmail.com
Wed May 9 08:11:28 CEST 2018



> On 8. May 2018, at 13:32, Christian Hubert <christian.hubert at dstribe.com> wrote:
> 
> *	Compared performance of std::map vs. .Net dictionaries : .Net is
> about 100x faster than std (the test populates the structure of 1000000
> integers ; 50ms for .Net vs. 5s for std, both in debug mode)

The numbers you get from a debug build or from running in a debugger are meaningless. For example, Microsoft’s CRT runtime injects lots of bounds and heap checking any time you run code in the Visual Studio debugger, which can be a dramatic slowdown even for the most optimised Release builds. Compilers and debuggers can have all kinds of performance-killing behaviour when debugging.

Also, synthetic tests aren’t giving too much information. Your benchmark tested insertion time, where one typically uses a std::map when one cares about fast lookups.

-Stefan



More information about the Bf-committers mailing list