Live data from Hacker News

Weld: Accelerating numpy, scikit and pandas as much as 100x with Rust and LLVM

notamonadtutorial.com

61–70 of 117 posts

Re: Weld: Accelerating numpy, scikit and pandas as much as 100x with Rust and LLVM

#61

There's also RustPython, a Rust implementation of CPython 3.5+: https://news.ycombinator.com/item?id=20686580 > https://github.com/RustPython/RustPython

Why didn't they call it Rython

RPython exists (it’s used to implement PyPy) so I imagine that would be confusing

Re: Weld: Accelerating numpy, scikit and pandas as much as 100x with Rust and LLVM

#62
post #44

whats the benefit of rust over julia or C for computation?

The computation here is actually not done in Rust. The Rust code is performing stages of compilation of the original source code, into an intermediate representation that LLVM finishes compiling. The fully compiled code is what does the computation.

SIMD / intrinsics?

Re: Weld: Accelerating numpy, scikit and pandas as much as 100x with Rust and LLVM

#63
post #44

Earlier quoted context omitted.

The computation here is actually not done in Rust. The Rust code is performing stages of compilation of the original source code, into an intermediate representation that LLVM finishes compiling. The fully compiled code is what does the computation.

SIMD / intrinsics?

That's part of what such compilation can do, yes.

Re: Weld: Accelerating numpy, scikit and pandas as much as 100x with Rust and LLVM

#64

This post combines pretty much every technology I'm obsessed with right now: Python, Rust, Pandas, Numpy, and LLVM. Yess!!!

Just a word of caution, always obsess with product and customer needs first :) In ML/data science tech first normally won’t end up well

I bet you’re fun at parties.

Re: Weld: Accelerating numpy, scikit and pandas as much as 100x with Rust and LLVM

#65

"the first implementation was in Scala, which was chosen because of its algebraic data types and powerful pattern matching. This made writing the optimizer, which is the core part of the compiler, very easy. Our original optimizer was based on the design of Catalyst, which is Spark SQL’s extensible optimizer. We moved away from Scala because it was too difficult to embed a JVM-based language into other runtimes and l…

> it was too difficult to embed a JVM-based language into other runtimes and languages

In addition to the JVM, Scala has had JS [1] and native (via LLVM) [2] targets for years.

(And that's not even mentioning any second-order compilations; e.g. Scala -> JVM bytecode -> native)

There's a number of reasons to not choose Scala, but portability is far from one of them.

[1] https://www.scala-js.org

[2] http://www.scala-native.org

Re: Weld: Accelerating numpy, scikit and pandas as much as 100x with Rust and LLVM

#66
post #36

"the first implementation was in Scala, which was chosen because of its algebraic data types and powerful pattern matching. This made writing the optimizer, which is the core part of the compiler, very easy. Our original optimizer was based on the design of Catalyst, which is Spark SQL’s extensible optimizer. We moved away from Scala because it was too difficult to embed a JVM-based language into other runtimes and l…

Very interesting. Do you have any references to share relevant to the article you suggest to be written?

No, I based on attending SparkConf between 2015 and 2017. You could probably assemble half of it just by reading summaries of Matei's keynotes.

Re: Weld: Accelerating numpy, scikit and pandas as much as 100x with Rust and LLVM

#67
post #36

Earlier quoted context omitted.

Very interesting. Do you have any references to share relevant to the article you suggest to be written?

No, I based on attending SparkConf between 2015 and 2017. You could probably assemble half of it just by reading summaries of Matei's keynotes.

Ah, thanks for the suggestion.

Re: Weld: Accelerating numpy, scikit and pandas as much as 100x with Rust and LLVM

#68
post #30

Very bizarre there is no discussion of numba here, which has been around and used widely for many years, achieves faster speedups than this, and also emits an LLVM IR that is likely a much better starting point for developing a “universal” scientific computing IR than doing yet another thing that further complicates it with fairly needless involvement of Rust. https://numba.pydata.org/

Numba is amazing. +1 for numba

But does it really speed up numerical libraries like numpy and pandas? I thought it only works on pure python code.

Re: Weld: Accelerating numpy, scikit and pandas as much as 100x with Rust and LLVM

#69
post #47

Earlier quoted context omitted.

Just a word of caution, always obsess with product and customer needs first :) In ML/data science tech first normally won’t end up well

It's important to enjoy your work, which is - among other causes - about having right tools. Also, some of us actually get to have some influence over what language we write our projects in.

I think you misunderstand the parent. The obsession to always focus on tools is I think, what they described. In the end of the day what matters is what you produce, not what tools you used. Nobody cares about what you used, apart from engineers.

Re: Weld: Accelerating numpy, scikit and pandas as much as 100x with Rust and LLVM

#70

Earlier quoted context omitted.

Not to sound like a member of the Rust evangelism strike force, but after using Rust for a couple years, I don't have any desire to go back to C - sum types alone are worth the switch to me, not to mention iterators, concurrency story, etc.

C++ has sum types as of several years ago with std::variant.

The way Python has macros, sure :)

You would have to keep everything in variants, or wrap/unwrap manually all over the place to get similar functionality.

And C has tagged unions.

Post reply on HN