Added: 4 years ago
From: MIT
Views: 63,541
Sort by time | Sort by thread (beta)

Link to this comment:

Share to:
see all

All Comments (26)

Sign In or Sign Up now to post a comment!
  • OCW is one great initiative. Thanks, MIT.

  • But of course, a robust compiler won't have that kind of intuition

  • You can further optimize his code by using Faulhaber's formula (sum of pyramidal squares) to replace t*t in the loop.

  • Instructor is Saman Amarasinghe

    /people.csail.mit.edu/saman/

  • 0:20 - "this last shit i give at the end of class"

    17:28 - "so, what da hell we do?"

    i think this guy is just trying to sneak words in.

  • @TheUberphil

    this last sheet.........

  • @TheUberphil My linear algebra teacher used to come into the room and ask "So how are you fuckers doing today?" College is a great place sometimes. :)

  • I cant even understand what hes saying!

  • What what was at 9:32 ???

  • One thing I've always wanted to learn is how to write a compiler. It was one regret that I have for not learning it in school. (I was a lazy student). Now that I'm working, I never have time.

    Thank you for posting this...

  • @all028 read the "dragon book" and use the net to help you

  • @vaf88 expensive; dry but worth it (Y)

  • @all028 This is my exact problem! If I could of gone back in time I would of done computer science or electrical engineering!

  • @tradingpilot - What did you take instead? I found computer science to be hard at the time but now, in retrospect, I actually like programming!

  • @all028 Last semester I took a compiler class in my universaty. The assignment was to build a bc-alike calculator. But I asked the professor to write something more challenging, then I wrote a LLVM based C-alike compiler, that I am currentlly planning to extend it to include untyped lambda expressions.

    It is not that hard, just grab FLEX and Bison, and in a week or so you might end up with something you might call a compiler

  • can any body tell what TA means?

  • teaching assistant

  • Teacher Assistant.

  • @nmania03 teaching assistant

  • Did anyone else do the optimization challenge?

    I got this (i did it before i saw his optimization, but of course i took longer than 4 minutes)

    int i,x,y,u;

    x=0;

    y=0;

    u = (4*a/b) +2

    for (i=0; i <= N; i++)

    { x = x + i*i + i*u + 1; }

    return x; After seeing his optimization, I realized I shouldn't rely on algebra to do things like this. The compiler would be really complicated if it started doing all sorts of algebra.

  • Ignore first 17 minutes.

  • Thank, you saved me 17 min. I owe you.:-)

  • "removed due to copyright concerns"

    What does that mean !!!!!!!!!!!!!

  • Probably some image or diagram that was being displayed in the slideshow

  • It's a bit obvious isn't it? You would think someone interested in something like this would have half a brain.

  • LOL== removec due to copyright concerns==

Loading...
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more