1 / 8

Keshav Pingali The University of Texas at Austin

Specialization is for d odos. Keshav Pingali The University of Texas at Austin. Lesson from natural world. Brown bears Adapted to live in temperate forests Polar bears A dapted to live above Arctic Circle Polar bears evolved from brown bears Specialization

trella
Download Presentation

Keshav Pingali The University of Texas at Austin

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Specialization is for dodos KeshavPingali The University of Texas at Austin

  2. Lesson from natural world • Brown bears • Adapted to live in temperate forests • Polar bears • Adapted to live above Arctic Circle • Polar bears evolved from brown bears • Specialization • Driven by struggle for survival Specialization

  3. Lesson from Salt Lake City • 1830-1978: • Mormons were mostly white • Very specialized • 1978: • Church elders have divine revelation • Today: • Mormons are very diverse • Generalization: • Driven by struggle for survival Generalization

  4. Main take-away • Struggle for survival can lead to both specialization and generalization • Specialization • Useful when there are mutually exclusive alternatives • Generalization • Useful if you can adapt to diverse environments • (eg) human beings of all races now live all over the world • What are the lessons for programming languages?

  5. Specialized languages = DSLs • DSLs usually evolve into general-purpose languages • To deal with diverse data types • To grow market share • MATLAB • Began with dense matrices and vectors to use EISPACK and LINPACK w/o writing FORTRAN code • Today: sparse matrices, objects, ADT’s, etc. • APL: dodo of array languages • SQL • Focus on structured data aka relations • Today: evolving to deal with unstructured data • Erlang • Began as a way to write telephony apps • Today: has evolved to a general functional language

  6. Two claims for DSLs • Claim I: productivity • Programmers can code with domain abstractions • (eg) relations, groups, fields, etc. • Claim II: performance • Compilers for DSLs can use domain-specific information to optimize programs • (eg) optimization in SQL • Counter-point: • Can be implemented easily in general-purpose languages ADTs + semantic information about methods

  7. Anecdotal Evidence • Graph analytics • Many DSLs: • GraphLab, PowerGraph, Ligra, SociaLite.. • Galois: • General-purpose programming model implemented in sequential C++ • SOSP 2014: Nguyen et al • Galois programs run 10-10,000 times faster than GraphLab programs • Shim for GraphLab on top of Galois in about 200 lines of code

  8. Generalization Specialization

More Related