Unlock the secrets of High-Frequency Trading systems

  • Data structures that are contained within a single cache-line are more efficient.
  • Use appropriate containers (e.g. prefer reserved std::vector than std::list)
  • Organize your data to avoid alignment holes (sorting your struct members by decreasing size is one way)
  • Don’t neglect the cache in data structure and algorithm design
  • Use smaller data types
  • Beware of the standard dynamic memory allocator, which may introduce holes and spread your data around in memory as it warms up
  • Make sure all adjacent data is actually used in the hot loops. Otherwise, consider breaking up data structures into hot and cold components, so that the hot loops use hot data.
  • Avoid algorithms and datastructures that exhibit irregular access patterns, and favor linear datastructures.
  • Know and exploit the implicit structure of data

 

Ariel Silahian
http://www.sisSoftwareFactory.com/quant
https://twitter.com/sisSoftware

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.