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

Heap allocations in real time critical path lead to significant slow down #311

Open
n-eiling opened this issue Jun 26, 2024 · 1 comment
Labels
performance issues related to performance optimization

Comments

@n-eiling
Copy link
Contributor

We should avoid all heap allocations during the simulation as they lead to syscalls and context switches.

For example in a simple simulation involving the Villas interface ~30% of simulation time is spent on this line:

AttributeStatic<T>::make(this->get()));

We could use an arena allocator instead or avoid copying at this position.

@n-eiling n-eiling changed the title Heap allocations in real time critical path lead to significan slow down Heap allocations in real time critical path lead to significant slow down Jun 26, 2024
@georgii-tishenin georgii-tishenin added the performance issues related to performance optimization label Jun 26, 2024
@stv0g
Copy link
Contributor

stv0g commented Jun 27, 2024

Do we really need to make allocations at all? Doesn't a fixed pre-allocated buffer could work too?

VILLASnode also comes with own allocator (struct Pool)

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

No branches or pull requests

3 participants