Previous | Next --- Slide 7 of 63
Back to Lecture Thumbnails
jtguibas

One interesting challenge with domain-specific languages has been that using many domain-specific languages with each other (e.g., Pandas, Numpy, Scipy, SQL) can cause bottlenecks in computational workflows due to inefficient data movement. There's an interesting project which used to work on solving this https://www.weld.rs/ :)

huangda

Can you remind us what productivity means exactly here? I get that performance has specific meaning (comparing runtime of same functions) and generality as well (how many different tasks/domains we can work in) but unclear what productivity means.

joshcho

Is there a more productivity-oriented version of CUDA?

ggomezm

I think productivity here means how easily you can write a program using the language. For example, you can do much more with a few lines of python code than you can do with a few lines of C code, so python would be said to have higher productivity.

superscalar

@huangda, @ggomezm's answer is correct. Notice how much faster it is to code in Python than in Rust – though this is a price that you must often repay in correctness errors. Other versions of this triangle graph often include a third 'security/correctness' axis instead of 'generality.'

ardenma

@joshcho the closest thing might be libraries built on top of CUDA like thrust or even more domain specific libraries like cuDNN. You also might be interested in something like this: https://github.com/openai/triton (which I admittedly know very little about, but will link in case you're curious)

pranil

I feel like there are a lot of languages and frameworks designed just for Machine Learning lately. TF/Keras and PyTorch are certainly some examples of domain-specific languages/frameworks. But there are several ML frameworks for very niche use cases as well. Examples could be CoreML (Apple's ML framework for Apple devices) and TensorFlow Lite (a storage-efficient and computation-efficient version of TF for embedded systems)

lee

Someone mentioned other "corners" of the triangle in lecture that aren't included here, like safety or correctness. This reminded me of the tradeoff we had to think of in our programming assignments of getting the "simplest" solution (high productivity AND high correctness), which were not as performant. Could safety and correctness fall under the umbrella of productivity, since we've seen in the class that it's possible to quickly put together a solution that's correct but slow?

tmdalsl

What does "performance" and "productivity" mean in the context of the slide/what are the difference between these two terms? I'm having difficulty understanding the differentiation.

legoat

@tmdalsl, performance refers to how fast programs execute. For, a program written in Python will often run slower than the same program written in C.

Productivity refers to much the programmer can accomplish in a language. I might be able to write that Python program in twenty minutes, while it might take me an hour in C.

It's difficult to achieve both high productivity and high performance because some of the comforts that make a high-productivity language like Python (no compilation required, no explicit types required) come at the cost of performance (the Python interpreter does type checking as it runs at a significant time-cost). I recommend looking into CS242, Programming Languages, which talks about the trade-offs of various languages in detail.

alishah

whats the difference between an embedded DSL and some library package?

ccheng18

What is the difference between performance and productivity here? I would assume they go hand in hand?

Please log in to leave a comment.