Unofficial Hacker News companion — get notified on comment replies, and more.

Marmot, an Alternative Go Compiler (opens external site)

134 points by andreynering 6 days ago | marmot.gaurav.zip | 48 comments on HN | Vote on HN (opens Hacker News) |

View full thread · View on Hacker News

Comment thread (8)

  1. Ok, the issue with alternative compiler isn't that individual features fail but when multiple features interact with each other in combination and fail or randomly gets really slow, and this only has fairly trivial benchmarks currently.

    The bigger issue is that Marmot implements it's own Go runtime as well, including GC, channels, and goroutine scheduler, and you can immediately see from their own benchmark that Marmot's performance falling off a cliff whenever there is allocation pressure. And an alternative Go with a bad GC and concurrency primitive isn't really worth using since that's Go's main value proposition, no matter how fast you can vectorize the loops.

    Replies (2)
    1. Seems like that depends on the program. For a program that doesn't lean on GC or concurrency all that much, smaller, faster binaries might be worth it?

      (Not that I'll be using this right away.)

      Replies (1)
      1. The main problem with that is that TinyGo already exists and compiles to embedded systems with LLVM, and smaller binary came with the territory, so there really isn't a niche left for Marmot imo.

        Go could really use better vectorization for hot loop performance though.

        Replies (2)
        1. There is no reason why you can't mix and match good approaches yourself with AI
        2. Unfortunately, TinyGo doesn't support the entire standard library that comes with Go, so _if_ this is something Marmot does then it sounds like a win.

          https://tinygo.org/docs/reference/lang-support/stdlib/

          Replies (1)
          1. Replies (1)
            1. Ouch, that's unfortunate. Hopefully they manage to get 100% support out of the box in the near future.
    2. I'm surprised the author (or, more pessimistically, the LLM) didn't bootstrap into the actual Go runtime.