• C++ Programming for Financial Engineering
    Highly recommended by thousands of MFE students. Covers essential C++ topics with applications to financial engineering. Learn more Join!
    Python for Finance with Intro to Data Science
    Gain practical understanding of Python to read, understand, and write professional Python code for your first day on the job. Learn more Join!
    An Intuition-Based Options Primer for FE
    Ideal for entry level positions interviews and graduate studies, specializing in options trading arbitrage and options valuation models. Learn more Join!

X9 - high performance message passing library (HFT)

Joined
6/22/23
Messages
3
Points
3
Hi,
I thought to reach out and share with you all a message passing library that I have written (in the context of an high frequency trading system) and just open sourced.
It's very useful for building complex (and fast) multithreading systems and it comes with quite a lot of examples and a profiling tool.
I wonder if it can be helpful for your own work/projects.
DF
link: GitHub - df308/x9: high performance message passing library
 
You are welcome. If you have any questions I will do my best to answer them.
 
Had a quick look at this C library

1. You use rand(), what's the rationale?
2. pthreads library is good but from the 90s.

C++11, TBB, PPL have all this functionality.

To be brutally honest, what's the compelling reason for using x9?
 
C++:
static int random_int(int const min, int const max) {
  return min + rand() / (RAND_MAX / (max - min + 1) + 1);
}

The C Standard rand() function makes no guarantees as to the quality of the random sequence produced. The numbers generated by some implementations of rand() have a comparatively short cycle and the numbers can be predictable. Applications that have strong pseudorandom number requirements must use a generator that is known to be sufficient for their needs.
 
Hi Daniel,

1. The function you copied from my code just returns a random integer in range [min,max]. Question 13.16
2. So am I.

X9 is a C library, not a C++ library, so for those working with C it might be a good option.
I have no experience with the libraries you mentioned so I can't comment on how they compare to mine.

DF
 
book on pthreads
 
Back
Top