Use malloc to speed up your code - Nikolaj Fogh - Meeting C++ lightning talks

Поділитися
Вставка
  • Опубліковано 25 гру 2024

КОМЕНТАРІ • 3

  • @TheArech
    @TheArech 14 днів тому +5

    The title is too click-baity, but I like the conclusion 😂 Benchmarks are super hard and are frequently deceiving.

  • @u9vata
    @u9vata 8 днів тому

    This is literally why I prefer NOT using magic libraries for benchmarks. People often does not get, why I am fine with compiler optimizing stuff out and me checking assembly to realize what really happens, but I totally prefer it that way.
    The conclusion is actually very close to what I think: Just avoid as much magic as possible when benchmarking and indeed just go do things by hand. If you really need that benchmarking you pretty much better off knowing assembly already anyways...

  • @JohnDlugosz
    @JohnDlugosz 10 днів тому

    - If you are going to copy (by value) an object that is either _large_ or has an expensive copy constructor , use a unique_ptr instead of a stack-based value.
    - Sometimes you copy without realizing it.