How we achieved 400 to 700 kmps #reinterpret_cast

  • ! Many threads but each in single threaded mode. No shared mutable.
  • ! allocation avoided — on millions of Output message objects. Pre-allocated ring buffer eliminates new()
  • ! allocation avoided — on millions of Input message objects, thanks to reinterpret_cast() on pointers. See reinterpret_cast^memcpy in raw mktData parsing
  • ! Stateless Parser. Downstream component (Rebus) handles cancels, modifications..
  • Hot fictions use pbref or RVO or move semantics, minimizing stack allocations
  • Socket tuning
  • Output list (of messages) buffering
  • aggressively simplified parsing. Minimal logic
  • large containers are pre sized. No reallocation
  • Very fast duplicate seq check — a hot function
  • Special Logger to reduce I/O cost
  • Sharding to speed up symbol lookup
  • No virtual functions
  • Inline
  • —-Speed with control
  • Best of both to reduce the real risk of our connection becoming slow or lossy
  • Depth monitor to detect missed messages
  • Capacity tracker to monitor mps rates
  • Missed seq reporting

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s