An unofficial, read-only Hacker News reader.

Marginalia Search, Money, C++, Rust, AI, Stuff (opens external site)

228 points by Curiositry 4 days ago | www.marginalia.nu | 84 comments on HN

View full thread · View on Hacker News

Comment thread (4)

  1. One place where it's definitely worse than C++ is memory usage.
    Replies (2)
    1. Depends in the C++ skills, and how the code looks like, from "C with a C++ compiler" up to "worthwhile of a CppCon talk".
    2. Regardless whether you're coding in C++ or Java, this sort of code needs to use scratch allocators or pooled objects everywhere that matters. Both languages have some nominal support for this via e.g. std::pmr and SegmentAllocator but I wouldn't stretch as far to say either feels idiomatic.
      Replies (1)
      1. Or you could simply switch to a performance-tuned allocator, such as mimalloc, tcmalloc, jemalloc, etc.