Tag Archives: Monoid

Monoid design pattern to Fastflow multihreading C++ library for high speed trading like HFT

Monoid design pattern to Fastflow multihreading C++ library for high speed trading like HFT

As I started digging further into Monoid pattern thing, it was promising with these articles:

https://www.fpcomplete.com/blog/2012/09/functional-patterns-in-c

https://isocpp.org/blog/2013/05/functional-patterns-in-c-bartosz-milewski

https://www.quora.com/Why-is-monad-more-famous-than-functor-and-applicative-functor

One of these links does have source code demo. To be honest, the code was not commented or documented at all which means I cannot go beyond than looking at. It did not compile with my GCC 4.9 but I have no patience to figure it out from there.

Check out the history here:

C++ event driven meta programming libraries

Or watch the video here:

Event driven C++ Metaprograming

As these links base the methodology off Haskell, there are a number of reasons which this functional programming language could be as fast as C or C++. Here are some other comparisons:
http://lambda.jstolarek.com/2013/04/haskell-as-fast-as-c-a-case-study/

https://www.quora.com/Why-is-monad-more-famous-than-functor-and-applicative-functor

As I am no expert here, but it was recommended another multithreading library could handle the same performance using these Monoid design patterns. It does look promising but after some further digging, Intel TBB or Boost Futures came up. I think that is a yucky proposition when I knew about a faster (and easier) multi-threading library called Fastflow.
I took a look to see if it was abandoned. To my surprise, 2.1 just came out 2 days ago. Talk about perfect timing!

http://sourceforge.net/projects/mc-fastflow/files/?source=navbar

There was a performance graph to show how Fastflow performs against other libraries. It seems to keep up with OpenMP which is the fastest one compared to CILK or TBB. Again, I am no expert here but I think it is worthy to revisit this multithreading library.

fastflow 236876

It is also comforting to know the FIX8 project chose FastFlow as well for concurrency which they claim their library is quite fast. Knowing all this with my revisit to both C++ on Linux, it might important to showcase my earlier on this library:

https://quantlabs.net/blog/?s=fastflow

Videos: https://www.youtube.com/user/quantlabs/search?query=fastflow

Keep your eyes peeled on more up to date topics on Fastflow

HOW DO YOU START A PROFITABLE TRADING BUSINESS? Read more NOW >>>

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!