MHN
Add a comment on Hacker News →
4 of 175 comments
  1. Or just rewrite in Numba.

    Most often, Python is enough.

  2. I would like to argue that one could make most codebases 50% faster if rewritten from scratch with performance in mind even in the same language.

    Taking python as an example, one could use benefit of hindsight and make better decisions from the start ( offloading slow parts to C binaries, better DS decisions, eliminating bloat etc.. ) if they rewrite the same app in Python. This is kind of what happens when a program gets rewritten to another language ( Rust ) - better decisions are made from the start and less bloat is copied over.

    Yes, obviously there are exceptions to this. But most of the time it is the choices we make that make the program slow and not the language itself.

    It used to be that rewriting programs were almost always a dumb idea due to how much effort went into it - see: https://www.joelonsoftware.com/2000/04/06/things-you-should-... . But AI has made this argument less compelling imo. I now regularly rewrite big chunks of programs with various end goals given to the agent.

  3. The reason rust is so tied to all the AI rewrites is because we see that the power of AI improves when the task has stronger verifiability. A stronger example is reverse-engineering: you have the final machine code to verify against. Performance of the final binary is still a bonus, but it's the strictness of Rust that makes it great for AI.

  4. I worry that this just adds complexity to most projects. The example in the readme is a Python function find_duplicates and poses to rewrite an implementation of Levenshtein in Rust. How do I know it's not faster than just switching to maintained software like RapidFuzz? Why would a maintainer want a dependency they can't understand in the hot path of their project?