geodel 6 days ago

Good read. I like the part that both writing low level as well as high level component in Rust was proven worthwhile.

Maybe one can transform slow code from high level languages to low level language via LLMs in future. That can be nice performance boost for those who don't have Amazon engineers and budgets

3
mjb 6 days ago

> Maybe one can transform slow code from high level languages to low level language via LLMs in future.

This is one of the areas I'm most excited for LLM developer tooling. Choosing a language, database, or framework is a really expensive up-front decision for a lot of teams, made when they have the least information about what they're building, and very expensive to take back.

If LLM-powered tools could take 10-100x off the cost of these migrations, it would significantly reduce the risk of early decisions, and make it a ton easier to make software more reliable and cheaper to run.

It's very believable to me that, even with today's model capabilities, that 10-100x is achievable.

geodel 6 days ago

I remember many years back one of Go language author wrote C to Go trasformer and used that to convert all compiler, runtime, GC etc into Go.

Now in today's time some experts like above could create base transformer for high level language and frameworks to low level language and frameworks and this all get exposed via llm interfaces.

One can say why all this instead of generating fast binary directly from high level code. But generating textual transformation would give developers opportunity to understand, tweak and adjust transformed code which generating direct binary would not.

SahAssar 6 days ago

> Maybe one can transform slow code from high level languages to low level language

I think you are describing a compiler?

geodel 6 days ago

I mean reading this article:

1) Kotlin code --> Java byte code --> JVM execution (slow)

vs

2) Kotin code --> Rust/Zig code --> Zig compiler --> native execution (fast)

Compiler is involved in both cases but I was thinking of 2) where slower code in high level lang is converted to another lang code. The compiler of which is known to produce fast runinng code.

dhosek 5 days ago

You’re describing a transpiler, but the problem is that idioms in a GC language like Kotlin don’t necessarily translate to a non-GC language like Rust or Zig. Add in the fact that Rust doesn’t have OO inheritance which is essential for a lot of JVM code to work (I don’t know much about Zig) and I’d be very suspicious of code generated by a Kotlin to Rust transpiler. (On the other hand, one of the first transpilers I ever encountered, web2c, worked well because the source language, Pascal, could be fairly easily translated into functional C without much if any sacrifice of speed or accuracy.)

bee_rider 6 days ago

Python -> C -> Assembly

Probably looks a lot like

Pseudocode -> C -> Assembly

Although the first is easier to run tests on and compare the outputs.