Which is faster, stack allocation or heap allocation?

Asked 2 years ago, Updated 2 years ago, 77 views

I think the stack is faster. But she's not a friend

in my experience It takes different time depending on the situation I didn't do that when I used the stack Which is faster, stack allocation or heap allocation?

performance c++ memory stack heap

2022-09-21 19:28

1 Answers

Stack allocation is faster.

The stack has a stack pointer It's a bit complicated because I use memory pool, but the performance is better than hip allocation.


2022-09-21 19:28

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.