Osiris icon indicating copy to clipboard operation
Osiris copied to clipboard

Avoid zero-initialization of memory areas for for more efficiency

Open mdilai opened this issue 2 years ago • 1 comments

Second version of #3324. Using plain "new"s instead of std::make_unique_for_overwrite and only for player avatars and weapon icons as it give measurable performance impact. Some benchmark times: Caching new avatar (median):

  • make_unique: 0.0001175s
  • new: 0.000057s

Loading weapon icons is hard to measure but anyway its a up to 9 unnecessary operations per frame on my PC.

mdilai avatar Oct 18 '21 21:10 mdilai

Very nice.

aoqia194 avatar Oct 19 '21 02:10 aoqia194