Due to the installation of a new fire alarm in ITMO server room, the system may be occasionally unavailable on the 27-th of May between 06:00 and 15:00 (UTC). ×

Question about performance of pointers

Revision en1, by StasyaCat, 2018-07-07 18:19:40

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

I used 706D - Vasiliy's Multiset 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


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