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 (2)

  1. I've of course not tried rewriting it in other languages, so take that with a grain of salt. But the code is by design required to stay aligned with the source codebases as the ports are continuously updated with upstream improvements, so I don't think the gains are coming from being a very different rewrite. What I see is just how much easier it is to express efficient code in c# without loosing expressiveness, with a really nice to use low level support (Span/ReadOnlySpan, stackalloc, built in intrinsics support, easy to use pooling, etc) so you can refactor where it matters.
    Replies (1)
    1. I think GP was asking if the speedup was due to eliminating allocations (maybe by doing them upfront?), not if the expressiveness of efficient code is easy.