2 comments

  • abhashanand150124 minutes ago
    &gt; The trading system reports an average latency of 10ms<p>Python is a bad choice for a system with such latency requirements. Isn&#x27;t C++&#x2F;Rust preferred language for algorithmic trading shops?
  • Veserv2 hours ago
    Why even bother with sampling profilers in Python? You can do full function traces for literally all of your code in production at ~1-10% overhead with efficient instrumentation.
    • hansvm1 hour ago
      That depends on the code you&#x27;re profiling. Even good line profilers can add 2-5x overhead on programs not optimized for them, and you&#x27;re in a bit of a pickle because the programs least optimized for line profiling are those which are already &quot;optimized&quot; (fast results for a given task when written in Python).
      • Veserv1 hour ago
        It does not, those are just very inefficient tracing profilers. You can literally trace C programs in 10-30% overhead. For Python you should only accept low single-digit overhead on average with 10% overhead only in degenerate cases with large numbers of tiny functions [1]. Anything more means your tracer is inefficient.<p>[1] <a href="https:&#x2F;&#x2F;functiontrace.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;functiontrace.com&#x2F;</a>
        • hansvm51 minutes ago
          That&#x27;s... intriguing. I just tested out functiontrace and saw 20-30% overhead. I didn&#x27;t expect it to be anywhere near that low.