Previous | Next --- Slide 13 of 73
Back to Lecture Thumbnails
timothyyeo

The domain specific languages (such as MATLAB, SQL, PyTorch, TensorFlow, and etc) are focused on productivity (easy to programming) and high performance, and not on generality as the name might suggest.

yayoh

Creators of programming languages need to compromise between generality, productivity, and performance. Many do well in two of these areas (e.g. pytorch for ML development helps achieve high performance and is easy to program in), but not all 3 (pytorch is not generalizable to non ML applications).

felixw17

This is a great way to understand the tradeoffs between various programming languages/systems - I was always aware of the performance/productivity tradeoff between Python and C/C++, but never formally realized how PyTorch achieves both productivity and performance at the cost of generality.

ChrisGabor

A common phrase I have heard is that developers typically have a limit on how many lines of code they can write per hour. I.e. writing 100 lines of code in C takes the same time as 100 lines of code in Python. DSLs offer the same performance you can get writing C code on common operations, while being able to use a scripting language like Python. One tradeoff not mentioned in this slide is that DSLs also have a learning curve, whereas if you have used C++ on many previous projects, you don't need to re learn C++ on a new project because of generality. DSL designers need to think about the barrier to adoption to get the most productivity.

Please log in to leave a comment.