Hacker News new | ask | show | jobs
by kaba0 1839 days ago
> It has throughput and memory penalties to get low and predictable latencies

Hard realtime C++ does as well.

1 comments

I've done lots of hard real time c++. It certainly has development time overhead, but the memory usage was the same as idiomatic c++, just everything was preallocated at max usage. No throughput hit either, if anything it was faster because of no allocations.
Well for the situations that it really really matters, it is rather MISRA-C++, and allocations are not allowed anyway.
I've done safety critical that wasn't MISRA. But you have reminded me that for years we were leaving optimization off so we could verify full code and branch coverage in the assembly. At which point Java is almost certainly faster, though we never would have fit in memory with Java. Eventually we started turning optimization on and it was harder to verify but not impossible.