Pacific++ 2017: Carl Cook "Low Latency C++ for Fun and Profit"

Ғылым және технология

Website: pacificplusplus.com/
Resources: github.com/pacificplusplus/co...
Twitter: / pacificplusplus
Abstract:
This talk describes how low latency systems can be developed in C++, demonstrating common coding techniques used to reduce code execution times. While automated trading is used as the motivation for this talk, the topics discussed are equally valid to other domains such as game development and soft real-time processing.
About the speaker:
Carl's interest is in low latency/high frequency proprietary trading systems, which has seen him work in Australia, The UK and The Netherlands. In terms of coding and engineering, he considers himself brutally pragmatic. Carl is also an active member of the SG14 study group, making sure that requirements from the automated trading industry are represented as C++ evolves. He has a Ph.D. and a M.Sc. from the University of Canterbury, graduating in 2006. Carl likes to drink Belgium beer and ski, sometimes concurrently.

Пікірлер: 27

  • @bingebinge3722
    @bingebinge37224 жыл бұрын

    What a talk, the most useful speech I have listened to about C++, and I have used the language for more than a decade.

  • @dexio85
    @dexio852 жыл бұрын

    Interesting how most of this is done in games, especially FPS server code but also in rendering hot path.

  • @frankiefx1986
    @frankiefx1986 Жыл бұрын

    So many insights from this presentation, one of the best I have ever heard!

  • @alexeiz
    @alexeiz5 жыл бұрын

    Solid advice here. Agree with most of it.

  • @Moriadin
    @Moriadin10 ай бұрын

    Great talk!

  • @max0x7ba
    @max0x7ba5 жыл бұрын

    In your own hashmap you don't really need that pointer to the key-value if you store them in another array at the same bucket array index. Also, on x86-64 in 64-bit mode using 64-bit integers generates 1-byte longer assembly instructions putting slightly more pressure on instruction cache.

  • @ForeverNils
    @ForeverNils21 сағат бұрын

    And will C++ be replaced by Rust in finance?

  • @teekwick
    @teekwick6 жыл бұрын

    Does he have a twitter or blog?

  • @Pacificplusplus

    @Pacificplusplus

    6 жыл бұрын

    twitter.com/ProgrammerCarl

  • @danielelupo4183
    @danielelupo41836 жыл бұрын

    Damn... I can put only one like...

  • @platin2148
    @platin21484 жыл бұрын

    Do it on a fu… fpga and call it a day. Also why a operating system? Can you tell me how you send packets without using the socket layer? Are you doing it directly in the kernel? Delete has hopefully a state maschine behind it else it would be a terrible way to allocate memory.

  • @NomoregoodnamesD8

    @NomoregoodnamesD8

    4 жыл бұрын

    The standard memory manager has to be able to handle any request at any time. It's only as optimized as a completely generic implementation can be. And it's great, as long as you are mallocing everything at once and then freeing everything at once, preferably in reverse order. You only have to consider rolling your own allocators if you expect new and delete / malloc and free numerous times over the program's life, which could cause heavy fragmentation with the default allocator .

  • @hitthebongbrother1087

    @hitthebongbrother1087

    4 жыл бұрын

    because you may require a significant chunk of code to work on an already existing operating system? like a video game? "how can you send packets without using the socket layer" a socket is just an ip address connected with a port, with some implementation behind it. You can easily avoid using that. the code for delete is written to accommodate the operating system in a generic way. In windows api code I have strong memories of writing my own heaps for classes of fixed sizes.

  • @tomek8522

    @tomek8522

    2 жыл бұрын

    kernel bypas, i.e. DPDK

  • @ForeverNils
    @ForeverNils19 сағат бұрын

    Isn't C faster? If it's possible is it better to use C than C++?

  • @Pacificplusplus

    @Pacificplusplus

    18 сағат бұрын

    No, neither is faster. It depends how you use them.

  • @eto895
    @eto8956 жыл бұрын

    Thats many to avoid.. Avoid this avoid that.. its like u better avoid to use c++ :(

  • @innokentiy-alaytsev

    @innokentiy-alaytsev

    5 жыл бұрын

    No, it's not. The things that should be avoided do not depend on the programming language, because basically, one should avoid certain patterns which are language agnostic. The same problems may appear in a program written in any language. The only thing that will be different is the actual code in this programming language that will have caused them.

  • @Adolf1Extra

    @Adolf1Extra

    5 жыл бұрын

    Avoid C++? These were tips for low latency/high frequency workloads, not regular workloads and I doubt you'd find another language that would allow aggressive finetuning of your code.

  • @gauravarya8952

    @gauravarya8952

    3 жыл бұрын

    Was it too much for you to handle? Performance tuning is essential for that specific domain as a lot depends on the time being taken to execute - which part did you not understand about that?

  • @michaelmorris2300

    @michaelmorris2300

    3 жыл бұрын

    @@Adolf1Extra ? C

  • @blazkowicz666

    @blazkowicz666

    2 жыл бұрын

    Why C++ over C if such optimizations required? Just curious

  • @aLittlePal
    @aLittlePal5 жыл бұрын

    it's not a small buck different, some of the instrument has a quite large dollar per tick value, so this type of tick-by-tick trading is extremely profitable.

Келесі