a furtive fumble in hard core obscenity the misuse of
play

A furtive fumble in Hard-Core Obscenity: the misuse of Template - PowerPoint PPT Presentation

Background Examples Conclusion A furtive fumble in Hard-Core Obscenity: the misuse of Template Meta-Programming to implement micro-optimisations in HFT. J.M.M c Guiness 1 1 Count-Zero Limited ACCU London, 2016 J.M.M c Guiness Knuth, Amdahl: I


  1. Background Examples Conclusion A furtive fumble in Hard-Core Obscenity: the misuse of Template Meta-Programming to implement micro-optimisations in HFT. J.M.M c Guiness 1 1 Count-Zero Limited ACCU London, 2016 J.M.M c Guiness Knuth, Amdahl: I spurn thee!

  2. Background Examples Conclusion Outline Background 1 HFT & Low-Latency: Issues C++ is THE Answer! Oh no, C++ is just NOT the answer! Optimization Case Studies. Examples 2 Performance quirks in compiler versions. Static branch-prediction: use and abuse. Switch-statements: can these be optimized? Perversions: Counting the number of set bits. “Madness” The Effect of Compiler-flags. Template Madness in C++: extreme optimization. Conclusion 3 J.M.M c Guiness Knuth, Amdahl: I spurn thee!

  3. HFT & Low-Latency: Issues Background C++ is THE Answer! Examples Oh no, C++ is just NOT the answer! Conclusion Optimization Case Studies. HFT & Low-Latency: Issues HFT & low-latency are performance-critical, obviously: provides edge in the market over competition, faster is better. Is not rocket-science: Not safety-critical: it’s not aeroplanes, rockets nor reactors! Perverse: to be truly fast is to do nothing! It is message passing, copying bytes perhaps with validation, aka risk-checks. It requires low-level control: of the hardware & software that interacts with it intimately. Apologies if you know this already! J.M.M c Guiness Knuth, Amdahl: I spurn thee!

  4. HFT & Low-Latency: Issues Background C++ is THE Answer! Examples Oh no, C++ is just NOT the answer! Conclusion Optimization Case Studies. HFT & Low-Latency: Issues HFT & low-latency are performance-critical, obviously: provides edge in the market over competition, faster is better. Is not rocket-science: Not safety-critical: it’s not aeroplanes, rockets nor reactors! Perverse: to be truly fast is to do nothing! It is message passing, copying bytes perhaps with validation, aka risk-checks. It requires low-level control: of the hardware & software that interacts with it intimately. Apologies if you know this already! J.M.M c Guiness Knuth, Amdahl: I spurn thee!

  5. HFT & Low-Latency: Issues Background C++ is THE Answer! Examples Oh no, C++ is just NOT the answer! Conclusion Optimization Case Studies. HFT & Low-Latency: Issues HFT & low-latency are performance-critical, obviously: provides edge in the market over competition, faster is better. Is not rocket-science: Not safety-critical: it’s not aeroplanes, rockets nor reactors! Perverse: to be truly fast is to do nothing! It is message passing, copying bytes perhaps with validation, aka risk-checks. It requires low-level control: of the hardware & software that interacts with it intimately. Apologies if you know this already! J.M.M c Guiness Knuth, Amdahl: I spurn thee!

  6. HFT & Low-Latency: Issues Background C++ is THE Answer! Examples Oh no, C++ is just NOT the answer! Conclusion Optimization Case Studies. HFT & Low-Latency: Issues HFT & low-latency are performance-critical, obviously: provides edge in the market over competition, faster is better. Is not rocket-science: Not safety-critical: it’s not aeroplanes, rockets nor reactors! Perverse: to be truly fast is to do nothing! It is message passing, copying bytes perhaps with validation, aka risk-checks. It requires low-level control: of the hardware & software that interacts with it intimately. Apologies if you know this already! J.M.M c Guiness Knuth, Amdahl: I spurn thee!

  7. HFT & Low-Latency: Issues Background C++ is THE Answer! Examples Oh no, C++ is just NOT the answer! Conclusion Optimization Case Studies. HFT & Low-Latency: Issues HFT & low-latency are performance-critical, obviously: provides edge in the market over competition, faster is better. Is not rocket-science: Not safety-critical: it’s not aeroplanes, rockets nor reactors! Perverse: to be truly fast is to do nothing! It is message passing, copying bytes perhaps with validation, aka risk-checks. It requires low-level control: of the hardware & software that interacts with it intimately. Apologies if you know this already! J.M.M c Guiness Knuth, Amdahl: I spurn thee!

  8. HFT & Low-Latency: Issues Background C++ is THE Answer! Examples Oh no, C++ is just NOT the answer! Conclusion Optimization Case Studies. HFT & Low-Latency: Issues HFT & low-latency are performance-critical, obviously: provides edge in the market over competition, faster is better. Is not rocket-science: Not safety-critical: it’s not aeroplanes, rockets nor reactors! Perverse: to be truly fast is to do nothing! It is message passing, copying bytes perhaps with validation, aka risk-checks. It requires low-level control: of the hardware & software that interacts with it intimately. Apologies if you know this already! J.M.M c Guiness Knuth, Amdahl: I spurn thee!

  9. HFT & Low-Latency: Issues Background C++ is THE Answer! Examples Oh no, C++ is just NOT the answer! Conclusion Optimization Case Studies. HFT & Low-Latency: Issues HFT & low-latency are performance-critical, obviously: provides edge in the market over competition, faster is better. Is not rocket-science: Not safety-critical: it’s not aeroplanes, rockets nor reactors! Perverse: to be truly fast is to do nothing! It is message passing, copying bytes perhaps with validation, aka risk-checks. It requires low-level control: of the hardware & software that interacts with it intimately. Apologies if you know this already! J.M.M c Guiness Knuth, Amdahl: I spurn thee!

  10. HFT & Low-Latency: Issues Background C++ is THE Answer! Examples Oh no, C++ is just NOT the answer! Conclusion Optimization Case Studies. HFT & Low-Latency: Issues HFT & low-latency are performance-critical, obviously: provides edge in the market over competition, faster is better. Is not rocket-science: Not safety-critical: it’s not aeroplanes, rockets nor reactors! Perverse: to be truly fast is to do nothing! It is message passing, copying bytes perhaps with validation, aka risk-checks. It requires low-level control: of the hardware & software that interacts with it intimately. Apologies if you know this already! J.M.M c Guiness Knuth, Amdahl: I spurn thee!

  11. HFT & Low-Latency: Issues Background C++ is THE Answer! Examples Oh no, C++ is just NOT the answer! Conclusion Optimization Case Studies. C++ is THE Answer! Like its predecessor C, C++ can be very low-level: Enables the intimacy required between software & hardware. Assembly output tuned directly from C++ statements. Yet C++ is high-level: complex abstractions readily modeled. Has increasingly capable libraries: E.g. Boost. Especially C++11, 14 & up-coming 17 standards. I shall ignore other languages, e.g. D, Functional-Java, etc. (garbage-collection kills performance, not low-enough level.) J.M.M c Guiness Knuth, Amdahl: I spurn thee!

  12. HFT & Low-Latency: Issues Background C++ is THE Answer! Examples Oh no, C++ is just NOT the answer! Conclusion Optimization Case Studies. C++ is THE Answer! Like its predecessor C, C++ can be very low-level: Enables the intimacy required between software & hardware. Assembly output tuned directly from C++ statements. Yet C++ is high-level: complex abstractions readily modeled. Has increasingly capable libraries: E.g. Boost. Especially C++11, 14 & up-coming 17 standards. I shall ignore other languages, e.g. D, Functional-Java, etc. (garbage-collection kills performance, not low-enough level.) J.M.M c Guiness Knuth, Amdahl: I spurn thee!

  13. HFT & Low-Latency: Issues Background C++ is THE Answer! Examples Oh no, C++ is just NOT the answer! Conclusion Optimization Case Studies. C++ is THE Answer! Like its predecessor C, C++ can be very low-level: Enables the intimacy required between software & hardware. Assembly output tuned directly from C++ statements. Yet C++ is high-level: complex abstractions readily modeled. Has increasingly capable libraries: E.g. Boost. Especially C++11, 14 & up-coming 17 standards. I shall ignore other languages, e.g. D, Functional-Java, etc. (garbage-collection kills performance, not low-enough level.) J.M.M c Guiness Knuth, Amdahl: I spurn thee!

  14. HFT & Low-Latency: Issues Background C++ is THE Answer! Examples Oh no, C++ is just NOT the answer! Conclusion Optimization Case Studies. C++ is THE Answer! Like its predecessor C, C++ can be very low-level: Enables the intimacy required between software & hardware. Assembly output tuned directly from C++ statements. Yet C++ is high-level: complex abstractions readily modeled. Has increasingly capable libraries: E.g. Boost. Especially C++11, 14 & up-coming 17 standards. I shall ignore other languages, e.g. D, Functional-Java, etc. (garbage-collection kills performance, not low-enough level.) J.M.M c Guiness Knuth, Amdahl: I spurn thee!

  15. HFT & Low-Latency: Issues Background C++ is THE Answer! Examples Oh no, C++ is just NOT the answer! Conclusion Optimization Case Studies. C++ is THE Answer! Like its predecessor C, C++ can be very low-level: Enables the intimacy required between software & hardware. Assembly output tuned directly from C++ statements. Yet C++ is high-level: complex abstractions readily modeled. Has increasingly capable libraries: E.g. Boost. Especially C++11, 14 & up-coming 17 standards. I shall ignore other languages, e.g. D, Functional-Java, etc. (garbage-collection kills performance, not low-enough level.) J.M.M c Guiness Knuth, Amdahl: I spurn thee!

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend