CppCon 2014: Andrei Alexandrescu "Optimization Tips - Mo' Hustle Mo' Problems"

Поделиться
HTML-код
  • Опубликовано: 5 фев 2025

Комментарии • 18

  • @bdafeesh
    @bdafeesh 6 лет назад +17

    This guy is fantastic. Seriously one of my favorite people to watch.

  • @DavidVaughan00
    @DavidVaughan00 8 лет назад +57

    My favorite C++ guy

    • @notinlist
      @notinlist 6 лет назад +1

      CPP MAN

    • @jsham92
      @jsham92 6 лет назад +9

      @@notinlist He's actually D MAN

  • @Schcarraffone
    @Schcarraffone 6 лет назад +67

    you should always code your c++ 11 and c++ 14 keeping in mind how many electrons are moved down the copper wires you know...

  • @morbo3000
    @morbo3000 9 лет назад +30

    A 5% difference in performance translates to 5% more battery life. That's huge.

    • @movax20h
      @movax20h 4 года назад +9

      5% difference in core of language or popular libraries is like you know eliminating few data centers. Billions of dollars worth.

  • @sankalpramesh5478
    @sankalpramesh5478 8 месяцев назад

    How does putting reference count at the start of the class help?

  • @GeorgeTsiros
    @GeorgeTsiros 6 лет назад +15

    To anyone who is against using goto, do recall what the underlying assembly looks like.

    • @ХузинТимур
      @ХузинТимур 3 года назад +1

      Well, on current Clang and GCC (in 2021) using `goto` and using two `delete`s produce same code.

  • @techprocess42
    @techprocess42 3 года назад

    i don't understand, why we need goto? Why not just dublicate "delete p_;" instead of goto?

    • @msqrt
      @msqrt 2 года назад

      As he says, it makes the (compiled) code smaller, which often means faster since more stuff fits in the instruction cache. Though in this case I guess he could just have it be the last thing in the function since both branches go there anyway. (Edit: nah, I thought of it wrong -- it can't just go in the end.)

  • @platin2148
    @platin2148 3 года назад +1

    ZII is really powerful

  • @GabrielHasbun
    @GabrielHasbun 9 лет назад +3

    If one is prematurely optimizing one is not allowing the compiler to know better.