Why not just just have most of it in wasm? There are wasm runtimes that don’t require js, and I’m sure Google can adapt their engine. Then they could integrate the other side with rust
You can always compile to wasm, or ship a wasm decoder. You can even ship a JS decoder, but speed and resource consumption are important, ruling both out.
That would likely require copying the image data in and out of the wasm instance's memory, while a pure Rust solution could have safety with less overhead.
For a untype language like js array, since it can be empty, you have to either always check the length, the item returned, or have a precondition to know the array is not empty.
All three of those cases is either code or context you’re holding in your head.
Right! It’s not really rocket science. I’ve been thinking of building a general “wait” command that just blocks until some event occurs. Still more “active” waiting, but as far as I understand the efficiency problem comes from polling.
Until there is a machine that is natively functional, there is always going to an incentive to go lower level for more performance.
Even hardware (GPUs) that functional language could trivially exploit, it’s still higher performance to write low level code and manages all the memory imperatively
You can get those numbers with https://codeberg.org/ggz14/radiance-vllm-mxfp4. I also can get it on a single R9700 but the 75 ~ 80 t/s is only peak acceptance of very predictable tokens like coding or json, and averages lower for prose. It's still much faster than regular llama.cpp.
reply