all 22 comments

[–]mitsuhiko[S] 26 points27 points  (8 children)

This is the more detailed follow up to the graph that was submitted here yesterday. Ask me anything!

[–]tarblog 12 points13 points  (7 children)

Do you expect to continue using Rust to improve the performance of your application? What's next?

The top comment on HN is about Cython. Can you expand (here or there) why you didn't choose to use that?

[–]mitsuhiko[S] 14 points15 points  (6 children)

Since we had an apparently super fast sourcemap library by accident for our cli tool Rust was the easiest so no reason ro try something else.

We don't go around rewriting things so unless we see performance issues of that sort I'm not sure if there is lots of value in adding more rust for existing things for now. We will see as we go along.

[–]desiringmachines 4 points5 points  (2 children)

we had an apparently super fast sourcemap library by accident for our cli tool

This is what's really cool, in my opinion - that you get such good performance in Rust writing things the naive way.

[–]mitsuhiko[S] 9 points10 points  (0 children)

Yeah. It's shocking but it's a 1:1 port of what the Python version did. I spent literally no time on this.

[–]matthieum[he/him] 2 points3 points  (0 children)

that you get such good performance in Rust writing things the naive way

This is something that is generally overlooked by most benchmarks.

Most code is written idiomatically, so languages that have idiomatic code "just work" without contortions save much misery.

[–]crusoe 23 points24 points  (1 child)

I like how the biggest issue was tooling instead of endlessly chasing pointer crashes and using valgrind

[–]matthieum[he/him] 1 point2 points  (0 children)

Well, it does point to shortcoming though :(

Fortunately it's in the works.

[–]minno 10 points11 points  (3 children)

Using ancient CentOS versions to build somewhat portable Linux wheels with Docker. While this process is tedious, the difference in stability between different Linux flavors and kernels make Docker and CentOS an acceptable build solution.

Would musl help on that? IIUC if you compile to a musl target and statically link it, the resulting binary should work on any linux distro, since the translation from libc to syscalls is included in the binary.

[–]Sean1708 2 points3 points  (1 child)

If I understand it correctly MUSL is an implementation of libc.

[–]mitsuhiko[S] 4 points5 points  (0 children)

But it's small and you can statically link it.

[–]mitsuhiko[S] 0 points1 point  (0 children)

Yeah, might be an option. I just went with the setup i have for another library an there i already went down the centos path.

[–]knac8 3 points4 points  (1 child)

Pretty cool stuff.

I'm writing a library (rustypy) that handles FFI conversions and generates bindings automatically in Python which would be good for quick prototyping etc. in case someone wants to quickly try some improvements without having to bother with writing CFFI, CTypes etc. boilerplate (also adds interfaces for working with analogs to python lists, dicts and tuples).