logoalt Hacker News

ActorNightly • yesterday at 3:24 PM • 4 replies • view on HN

I mean, I have had great success with prototyping stuff in python, then letting an llm translate it to C. My 3090 with Gemma4:31b does this very well with a few guidelines.

Dunno how much investment is needed into language optimization anymore.


Replies

14113 • yesterday at 4:36 PM

That works well for greenfield code, but if working on compiler optimisations has taught me anything, it's that there is a lot of legacy code out there in the world that would benefit from re-compilation with optimisations - but would be very difficult to re-write for speed (regardless of whether the work is done by a human, AI, or other machine tool). JIT compilation fits very nicely in this niche, as it means that existing Python projects can get (theoretically) better performance without re-writing.

grep_it • yesterday at 11:04 PM

I've had good success with just using mypyc (https://mypyc.readthedocs.io/en/latest/introduction.html) on typed python code.

➕ show 1 reply
mring33621 • yesterday at 4:19 PM

Agree with the general workflow: prototype with an easy-to-read language then port to lower-level, faster language

lenerdenator • yesterday at 9:41 PM

People have been calling Python a "prototyping" language for decades. I'd be interested to see how many Python projects ever actually get rewritten in a more performant language. My guess is, up until the last five years that was almost never done. Even with LLMs to help, is that the best use of your tokens and humans' time? It doesn't add a feature. It could conceivably cut costs after enough time, but only if done correctly.

➕ show 3 replies