Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added default_init_allocator from http://stackoverflow.com/a/21028912… #3248

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

pnorbert
Copy link
Contributor

…/273767 and adiosvec type in helper::adiosType.h to be able to resize a vector without initialization. Changed BufferSTL and BP3/BP4/SST using adiosvec as well as in BP5 where vector was used. It is much faster than vector with Release build, but it is much slower with Debug build.

Release build:
$ ./bin/PerfVector 1024
Size = 1073741824 std::vector = 0.145024 helper::adiosvec = 5.73e-06 Malloc = 2e-08
Debug Build:
$ ./bin/PerfVector 1024
Size = 1073741824 std::vector = 0.145616 helper::adiosvec = 5.48551 Malloc = 9.16e-06

…/273767 and adiosvec<T> type in helper::adiosType.h to be able to resize a vector without initialization. Changed BufferSTL and BP3/BP4/SST using adiosvec as well as in BP5 where vector<char> was used. It is much faster than vector<char> with Release build, but it is much slower with Debug build.

Release build:
  $ ./bin/PerfVector 1024
  Size = 1073741824 std::vector = 0.145024 helper::adiosvec = 5.73e-06 Malloc = 2e-08
Debug Build:
  $ ./bin/PerfVector 1024
  Size = 1073741824 std::vector = 0.145616 helper::adiosvec = 5.48551 Malloc = 9.16e-06
@pnorbert
Copy link
Contributor Author

This whole thing is up for discussion. I don't remember right now where vector allocation was a measurable issue.

@pnorbert
Copy link
Contributor Author

It is so slow in Debug mode, that these test take a minute to run.
Engine.BP.BPBufferSizeTest.SyncDeferredIdenticalUsage.BP3.Serial
Engine.BP.BPBufferSizeTest.SyncDeferredIdenticalUsage.BP4.Serial

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant