Live data from Hacker News

We rewrote our Rust WASM parser in TypeScript and it got faster

openui.com

191–200 of 239 posts

Re: We rewrote our Rust WASM parser in TypeScript and it got faster

#191

When there is a solid test harness, AI Coding can do magic! It was able to beat XZ on its own game by a good margin: https://github.com/mohsen1/fesh

> I had no idea how any of this works. This is apparent. xz's own game is not "a specialized compression pre-processor for x86_64 ELF binaries.". xz's own game is a general-purpose compression utility suited for a range of tasks, not optimized for one ridiculously specific domain. Also, any compression benchmark really ought to include speed of de/compression, not only compression ratio, as compression algorithms occ…

I never claimed to beat xz as a general-purpose compressor. .tar.xz is the dominant format for Linux source tarballs and distro packages. So optimizing for ELF + x86_64 is optimizing for a very real and common case, not some toy benchmark.

btw goal of the project was not building a production ready solution. It was curious case of black box software development. Compression is great because input and output are precise bits. As for speed, I think it's comparable since it's using most of XZ infra anyways.

Re: We rewrote our Rust WASM parser in TypeScript and it got faster

#192

Something not unlike this happened to me when moving some batch processing code from C++ to Python 1.4 (this was 1997). The batch started finishing about 10x faster. We refused to believe it at first and started looking to make sure the work was actually being done. It was. The port had been done in a weekend just to see if we could use Python in production. The C++ code had taken a few months to write. The port was…

I ported Python to C++ one time and it ran 10c faster with 10x less memory usage with no architectural changes

Re: We rewrote our Rust WASM parser in TypeScript and it got faster

#193

Earlier quoted context omitted.

> but in the end it was deemed a waste of time when the whole project was terminated. The main lesson of the story. Just pick Python and move fast, kids. It doesn’t matter how fast your software is if nobody uses it.

And this is why pretty much all commercial software is terrible and runs slower than the equivalent 20 years ago despite incredible advance in hardware.

For lots of software there wasn't an equivalent 20 years ago because there wasn't a language that would let developers explore semi-specified domains fast enough to create something useful. Unless it was visual basic, but we can't use that, because what would all the UX people be for?

Re: We rewrote our Rust WASM parser in TypeScript and it got faster

#195
post #84

Earlier quoted context omitted.

This is either an overly pedantic take or a disingenuous one. The very first line that the parent quoted is > uv is fast because of what it doesn’t do, not because of what language it’s written in. The fact that the language had a small effect ("a bit") does not invalidate the statement that algorithmic improvements are the reason for the relative speed. In fact, there's no reason to believe that rust without the alg…

I think we might be talking past each other a bit. The specific claim I was responding to was that all of uv’s performance improvements come from algorithms rather than the language. My point was just that this is a stronger claim than what the article supports, the article itself says Rust contributes “a bit” to the speed, so it’s not purely algorithmic. I do agree with the broader point that algorithmic and archite…

You are being very pedantic here.

Re: We rewrote our Rust WASM parser in TypeScript and it got faster

#196
post #130

Earlier quoted context omitted.

The LLMs are pretty good at optimising. Not because they are brilliant, but because they are pretty good at throwing pretty much all known techniques at a problem. And they also don't tire of profiling and running experiments.

If there's one thing LLMs are really, really good at, it's having a target and then hitting / improving upon that target. If you have a comprehensive test suite or a realistic benchmark, saying "make tests pass" or "make benchmark go up" works wonders. LLMs are really good at knowing patterns, we still need programmers to know which pattern to apply when. We'll soon reach a point where you'll be able to say "X is slo…

I've not tried this yet, but doesn't it use up loads of tokens? How do you do it efficiently?

Re: We rewrote our Rust WASM parser in TypeScript and it got faster

#199

Earlier quoted context omitted.

My experience is the exact opposite. This was particularly true for one of the projects I've worked with in the past, where Python was chosen as the main language for a monitoring service. In short, it proved itself to be a disaster: just the Python process collecting and parsing the metrics of all programs consumed 30-40% of the processing power of the lower end boxes. In the end, the project went ahead for a while…

> but in the end it was deemed a waste of time when the whole project was terminated. The main lesson of the story. Just pick Python and move fast, kids. It doesn’t matter how fast your software is if nobody uses it.

> Just pick Python and move fast, kids. It doesn’t matter how fast your software is if nobody uses it.

The reason nobody uses your software could be that it is too slow. As an example, if you write a video encoder or decoder, using pure Python might work for postage-stamp sized video because today’s hardware is insanely fast, but even, it likely will be easier to get the same speed in a language that’s better suited to the task.

Re: We rewrote our Rust WASM parser in TypeScript and it got faster

#200

Earlier quoted context omitted.

> but in the end it was deemed a waste of time when the whole project was terminated. The main lesson of the story. Just pick Python and move fast, kids. It doesn’t matter how fast your software is if nobody uses it.

> Just pick Python and move fast, kids. It doesn’t matter how fast your software is if nobody uses it. The reason nobody uses your software could be that it is too slow. As an example, if you write a video encoder or decoder, using pure Python might work for postage-stamp sized video because today’s hardware is insanely fast, but even, it likely will be easier to get the same speed in a language that’s better suited…

Learning that it’s too slow takes users.
Post reply on HN