Question about performance of pointers

Revision en1, by stanislav.bezkorovainyi, 2018-07-07 18:19:40

I tried to test perfomance of different approaches to build and use trie data structure.

I used 706D - Мультимножество Василия to test my versions of tries on it.

The question is: Why does approach with pointers takes 2 times more memory than one with static array? As I know, a pointer stores an address of a variable, so it shouldn't take that much memory.

Here are my submissions:

Pointer approach: 40063381

Static array approach: 40063561

Any suggestions are welcomed!

Tags performance, perfomance, trie, c++, pointers, data structure

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English stanislav.bezkorovainyi 2018-07-07 18:19:40 540 Initial revision (published)