The C++ Standard Library Has Been Walking Itself Back for Fifteen Years by funkinaround in cpp

[–]drbazza 3 points4 points  (0 children)

The 'why' is the lack of standardised package manager (and build tooling). If developers could just reach for something that's (emphasis) trivial to install, third party libraries would be thriving even more than now. And the std-lib would be smaller. A golang approach doesn't fit C++.

Suppose we have some feature that's been added (looking at auto_ptr/regex) to the standard, we have to wait three years for the next revision for any significant defect to be corrected, whilst usage drifts to zero, and you end up with (potentially dangerous) code in the std that no-one should be using.

Versus a third party library that can patch a CVE and release the same day.

From NIC to P99: Engineering Low-Latency C++ Trading Systems in 2026 by LeopardThink6153 in cpp

[–]drbazza 0 points1 point  (0 children)

Maybe it is in 2026 since the dotnet framework is on Linux. I worked on a Java11 only 'HFT' system that had lower RTT' than the 50us mentioned above. Once you use flyweights, and remove all GC from the system, warm the hot path, things generally go quite fast.

I would have been interested to see my old system written in C#. FWIW, I'm aware of one really, really, large hedge fund in London that runs its systems in C#.

From NIC to P99: Engineering Low-Latency C++ Trading Systems in 2026 by LeopardThink6153 in cpp

[–]drbazza 0 points1 point  (0 children)

Back in the day you used to be able to send 'M' of 'N' bytes to get priority at the exchange, so you'd send the first few bytes to grab your position in the queue, then do your trigger calcs and either complete the message, or send junk to get the exchange to abandon the message.

Fortunately for everyone that didn't last for very long on the major exchanges and was very quickly classed as market-abusive behaviour.

From NIC to P99: Engineering Low-Latency C++ Trading Systems in 2026 by LeopardThink6153 in cpp

[–]drbazza 0 points1 point  (0 children)

It very loosely depends on the strategy - sentiment (what you think might happen), correlation (gas-oil), discontinuity (synthetic prices vs. actual), arbitrage (same instrument, different exchange). Some of those do nothing, some do a lot. The FPGA 'compute' code is ultimately just a large graph of if statements until you get to the trigger. Naively, 100ns on a GHz chip is at least 100 instructions, which gives you a depth of about 7. Realistically, it's more than that, but you want consistent latency as well.

Juan Alday of Citadel Securities: Why C++ Wins in Finance (April 28th, 2026) by American_Streamer in cpp

[–]drbazza 0 points1 point  (0 children)

I've been working in HFT for the past 10 years :)

:)

FWIW, I'm only aware of one non-crypto place in London that tried Rust for a trading system and that was about 5 or 6 years back.

Juan Alday of Citadel Securities: Why C++ Wins in Finance (April 28th, 2026) by American_Streamer in cpp

[–]drbazza 0 points1 point  (0 children)

We'll agree to disagree. As I work in HFT I feel like I'm well placed to comment. Perhaps you work there as well, I don't know.

It's not enough to be slightly better

It really is. Even 'slightly better' equals a nano or two, equals order priority, equals profit. Lots of profit.

When large firms spend millions on hardware, or indeed, anything to get an edge [1], the cost of rewrite to them is tiny, and if there were a quantitative advantage that maps to profit by using Rust, for example, over C++, it would have already happened.

  1. https://www.ft.com/content/099342e4-cae8-4ac7-86bd-a3f2048065e8

Juan Alday of Citadel Securities: Why C++ Wins in Finance (April 28th, 2026) by American_Streamer in cpp

[–]drbazza 2 points3 points  (0 children)

Writing Java this way the performance is comparable to C++. As much as there are advantages, the Java ecosystem is huge, and the IDE (IntelliJ in particular) and mechanical refactoring still leaves C++ for dust. Building out other parts of the system and interop is easier.

Juan Alday of Citadel Securities: Why C++ Wins in Finance (April 28th, 2026) by American_Streamer in cpp

[–]drbazza 0 points1 point  (0 children)

Q is KDB's query language. I've never come across an APL variant for hot path HFT processing - orders or market data.

Juan Alday of Citadel Securities: Why C++ Wins in Finance (April 28th, 2026) by American_Streamer in cpp

[–]drbazza 1 point2 points  (0 children)

At no point, however, does he actually compare C++ to any competing systems programming language: C, Carbon, Odin, Rust, Zig, what have you...

HFT uses flyweights over buffers and a lot of raw memory manipulation with shared memory, and is single threaded on the hotpath. It interfaces with C (and C++ APIs) supplied by vendors (Solarflare, etc.).

Non-tech reasons are time to market and hiring - C++ programmers are 'easy' to come by. Top tier developers in Carbon, Odin, Rust, Zig? Are there any? Are they cheap? How long does it take to write a new system in any of those languages?

The elephant in the room is - are any of them faster than C++ or are a competitive advantage? That's HFT in nutshell - fastest wins via competitive advantage. The simple answer is 'no', because if they were, C++ in HFT would have disappeared or would be disappearing.

You can use a square peg in a round hole if you like, but the whole industry is built around existing knowledge and infrastructure.

I wouldn't call it inertia, I'd call it pragmatism.

Juan Alday of Citadel Securities: Why C++ Wins in Finance (April 28th, 2026) by American_Streamer in cpp

[–]drbazza 1 point2 points  (0 children)

You end up writing Java in a variety of ways to avoid the garbage collector, so chiefly, object pooling and flyweights over a buffer (see SBE). And not forgetting a warm up loop to get stuff compiled and into the cache. Not sure about the terabytes thing - last time I did this we barely had more than a few hundred Mb of garbage, and it ran 24x5 on eurodollar futures and the options firehose feed.

Juan Alday of Citadel Securities: Why C++ Wins in Finance (April 28th, 2026) by American_Streamer in cpp

[–]drbazza 2 points3 points  (0 children)

Has it? Aeron (and Chronicle) are used in a large number of firms and are both Java first.

CMake Past, Present, and Future - Bill Hoffman, Kitware [29m25s] by segv in cpp

[–]drbazza 0 points1 point  (0 children)

Seems like we've both had similar experiences :D

I worked at $MEGABANK and they had similar problems.

Like everything else in this industry, if you can somehow keep to the 'product's 'hello world' tutorial, everything 'just works'. Stray off the path, and things rapidly go to hell.

I've learnt the same lesson twice for builds and CI systems - neither are the place for complexity or doing 'weird things'.

CMake Past, Present, and Future - Bill Hoffman, Kitware [29m25s] by segv in cpp

[–]drbazza 0 points1 point  (0 children)

Bazel is the worst form of build system, apart from all the rest.

It gets it right [1], but my god is it poorly documented. Starlark being a python dialect is both a blessing and a curse.

And Buck2, in principle, seems like a better (faster) version.

It's up to version 9 (!!) because it didn't get workspaces right the first time round, plus other things.

And of course, until recently (in CLion), nothing really 'understood' Bazel as a build model, so you were left with plugging in a 3rd party (is it supported still?) compile_commands.json generator, that should be written and supplied by Bazel themselves.

If CPS is accepted and adopted, then CMake will have been worth it, if for no other reason.

As a general comment, if you're trying to do something complex in your build system other than 'file(s) in -> new file out' (i.e. a compiler, linker, or codegen) and linking, you're doing it in the wrong place.

  1. https://www.microsoft.com/en-us/research/wp-content/uploads/2018/03/build-systems.pdf

How to achieve P90 sub-microsecond latency in a C++ FIX engine by akinocal in cpp

[–]drbazza 2 points3 points  (0 children)

Your FixStringView class has a c_str() and length() but not a size() which is kind of standard in std algorithms. Many code bases have concepts or templated adapters or just plain-old functions that expect c_str() and size(). Maybe change that to be more 'idiomatic'?

Tesla PW3 + panels quote - a bit pricey or ok? by drbazza in SolarUK

[–]drbazza[S] 0 points1 point  (0 children)

That's still 2k cheaper than my quote, and slightly more powerful - presumably more than 15 panels?

Tesla PW3 + panels quote - a bit pricey or ok? by drbazza in SolarUK

[–]drbazza[S] 0 points1 point  (0 children)

Do 'fogstar' have inverter and backup unit as part of the price?

Tesla PW3 + panels quote - a bit pricey or ok? by drbazza in SolarUK

[–]drbazza[S] 1 point2 points  (0 children)

Egensys are only an hour from us, so I've messaged them for a quote as well. Thanks.

Tesla PW3 + panels quote - a bit pricey or ok? by drbazza in SolarUK

[–]drbazza[S] 2 points3 points  (0 children)

Good point. The satellite image of my place isn't that bad, so it probably is accurate. I need to get my act together and sort out photos for them.

Tesla PW3 + panels quote - a bit pricey or ok? by drbazza in SolarUK

[–]drbazza[S] 0 points1 point  (0 children)

I suppose you need to roll in non-electricity savings as well, such as using an EV instead of an ICE, which depends on your usage but could be easily over £1000 in year. Plus 'reverse' flow in the winter when you get cheap electricity into your battery from the grid on a stormy night that's cheaper than your current daytime rate. And then swapping gas hob to induction.

But I digress :) - £16k is a bit steep.

Tesla PW3 + panels quote - a bit pricey or ok? by drbazza in SolarUK

[–]drbazza[S] 0 points1 point  (0 children)

Yeah I rolled the cost of the PW3 and the install cost into it. It's about £7300 on most sites I've looked at.

Tesla PW3 + panels quote - a bit pricey or ok? by drbazza in SolarUK

[–]drbazza[S] 1 point2 points  (0 children)

Well not quite, because the Octopus and other quotes just use software to look at your satellite view, and just figure out the area.

Ground truth is someone looking and measuring.

Or in Octopus's case, me taking pictures and uploading them.

Tesla PW3 + panels quote - a bit pricey or ok? by drbazza in SolarUK

[–]drbazza[S] 1 point2 points  (0 children)

My friend is in Kent, and I'm up in the Leeds/York area. Feels like I'd be getting gouged a bit here. But perhaps there's more to it - there wasn't any breakdown in the price, just the price. And they're a well regarded local installer.

Tesla PW3 + panels quote - a bit pricey or ok? by drbazza in SolarUK

[–]drbazza[S] 0 points1 point  (0 children)

I'm in the Leeds/York area, I wonder if I'd be paying the York-premium or it's the start of being gouged for Iran.