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
 
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 Bottom