General > Off Topic

C++ and STL. How portable is JH?

<< < (2/3) > >>

singalen:
I expected a good vector to allocate multiple segments, not a single one, like this colony does. Iterators are invalidated on modification anyway, so there's no point keeping the memory piece contiguous.

What's the difference between moving elements on reallocation and on deletion? The long-hyped move semantics should deal with both cases, no?

Shadowfury333:
Move semantics does deal with both cases, so the performance cost of realloc/delete moves is probably negligible at gaming scales. The issue is more the cost of memory management and destructor operations on deletion, since frequent deletion and re-insertion is fairly common in games.

Sereg:
For the time being, this thread is over my head, but as I'm trying to learn C#... I might ask some of you for help at some point =P

thelaptop:

--- Quote from: Sereg on December 16, 2016, 20:13 ---For the time being, this thread is over my head, but as I'm trying to learn C#... I might ask some of you for help at some point =P

--- End quote ---

You do realise that C# is nothing like C++ right?  It's closer to Java than C++ in terms of family and behaviour.

Shadowfury333:
C# and C++ are two different beasts. However, they are also the exact two beasts I tame and ride every day at work.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version