+ 1
placement new | what is need of same
Hi Refer below code (would appreciate any improvement if you can suggest if any) where I tried to implement placement new: https://code.sololearn.com/c6nHkVF5JiSi Time in normal new operation is consuming more time than what is taken by placement new. My query is do we need to go for this placement new or move constructor (temp object creation on push_back argument) on vector is sufficient? Thanks a lot...
3 odpowiedzi
+ 1
Okay... Any specific reason to do so ?
+ 1
To improve performance
https://www.celonis.com/blog/c-memory-arenas-and-their-implications/
0
It's used for allocating memory in a specific region defined by a programmer,otherwise known as an Arena