1. How to implement and use HDR histogram and perf_event_open API in .NET

    Picollo

    Picollo is a new library for serious performance work in .NET. Picollo stands for Performance Instrumentation and Continuous Observation for Low-Level Optimization. It allows you to measure code performance with cycle-level precision, moving the time resolution to the picosecond level.

    The initial public release of Picollo v0.1.0 contains two components. First, a modern version of an HDR histogram, which is much faster for recording data and easier to use. It has a thread-local implementation that allows scaling metrics collection across many threads with minimal impact on performance of the existing code. Second, a set of APIs for `perf_event_open`, including fast-path reads, that give raw access to PMU counters from .NET on Linux, WSL included.

    Read more...

  2. How I optimized my 1BRC solution step-by-step and why .NET is great for high-performance code

    At the start of the New Year, GitHub exploded with The One Billion Row Challenge started by Gunnar Morling. Originally it was a Java-only competition, but others wanted to have fun as well. Please read these links first if you do not know about this challenge and its rules.

    I also fell down this rabbit hole. I wrote one of the fastest managed 1BRC implementation that performs well not only on the specific dataset that everyone was optimizing for but also on more generic data. Furthermore, at the initial time of writing (the post date) my results were close to the C++ implementation for the default data and were faster in the case of more complex data.

    Read more...

  3. Evaluating Rust as the common denominator of modern development

    In this blog series, I will experiment with Rust as a safer and simpler C/C++ replacement. The idea is to combine a couple of C dependencies in Rust, to do some work using the dependencies in Rust and to expose a final API from a Rust library via C ABI. Then I will consume the same exported Rust methods from a number of modern languages/platforms such as C#, Python, Java, Nodejs, R, Go and even back from C/C++.

    Read more...

  4. Replace VBA with modern C# for UDFs, macros and other Excel automation without Visual Studio

    A week ago, a friend of mine asked me if I could help him with parsing his old Excel files containing orders of Christmas trees. It was his seasonal business every end of a year for a long time, and old orders back to 2006 were kept in quite a free form so that I myself as a human had difficulties to grasp the structure of the worksheets. However, the goal was to export the data into a CRM system, to identify clients who made regular orders and to call them and try selling trees this year as well.

    Read more...

  5. Why I am taking a pause with F# development (until tooling is fixed or I buy 32 core/64 Gb machine)

    TL;DR; F# is great for algorithms and analytics. It could work for libraries, interop and high-performance code as well, but the experience is far from great and I do not want to fight with it anymore. At least I tried… I have been functional programming aficionado for a while. At some point, I took its advantages over mutable imperative code almost religiously. I fell in love with F#. Then I fell in love with mechanical sympathy, and F# - by being a multi-paradigm and .

    Read more...

  6. Easy and joyful static site generation with Hugo

    I have migrated my WordPress blog to Hugo. Since I am not a web publishing expert, I have nothing to say other than the experience was very nice and flexibility is awesome. Markdown + VS Code + git rule them all! I didn’t have enough patience to setup Jekyll with all its dependencies hell a while ago. WordPress was easy to install from WebMatrix and to run on IIS in AWS cloud, but I was afraid to touch anything because the entire setup looked fragile.

    Read more...

  7. I am always amused when retail traders are offered and then do use black boxes with complex frameworks to build automatic trading strategies. Usually, that goes with an explanation how cool those platforms are and how easy to build a strategy using them. They forget about vendor lock-in and the most terrible model of shared state with events hell like “OnData”, “OnOrder”, “OnBarOpen”, “OnBarClose”, etc. The more I talk with people, the more I realize that CEP is the approach that desks and serious traders use.

    Read more...

  8. Background and thoughts on my real-time number-crunching library

    TL;DR; This post is about background and thoughts on my number-crunching library Spreads, which stands for Series and Panels for Real-time and Exploratory Analysis of Data Streams. The library and its readme are on GitHub: https://github.com/Spreads/Spreads. While I worked at Goldman Sachs as a research analyst, I got used to internal declarative time series processing language. It was so cool that I could build MSCI index rebalancing methodology with several lines of code.

    Read more...

  9. On my LinkedIn page, there are almost no endorsements for programming/tech, even though I program since age 12 or so. Probably this is an indication that the endorsement system is broken there or I am not very active there recently. Or this is a reflection of a mild problem I have - very few people from my former professional, mostly investment banking, network know that I can code well beyond VBA scripts.

    Read more...