Menu
Sign In Search Podcasts Charts People & Topics Add Podcast API Pricing

Chris Lattner

๐Ÿ‘ค Speaker
See mentions of this person in podcasts
2524 total appearances

Appearances Over Time

Podcast Appearances

Lex Fridman Podcast
#381 โ€“ Chris Lattner: Future of Programming and AI

I don't want to break the old thing though.

Lex Fridman Podcast
#381 โ€“ Chris Lattner: Future of Programming and AI

And so the typical way of handling this kind of stuff before is if you're talking about C++ templates or you're talking about C with macros, you end up with if-defs.

Lex Fridman Podcast
#381 โ€“ Chris Lattner: Future of Programming and AI

You get all these weird things get layered in, make the code super complicated.

Lex Fridman Podcast
#381 โ€“ Chris Lattner: Future of Programming and AI

And then how do you test it?

Lex Fridman Podcast
#381 โ€“ Chris Lattner: Future of Programming and AI

It becomes this crazy complexity, multidimensional space that you have to worry about.

Lex Fridman Podcast
#381 โ€“ Chris Lattner: Future of Programming and AI

And that just doesn't scale very well.

Lex Fridman Podcast
#381 โ€“ Chris Lattner: Future of Programming and AI

Yeah, so it can even do more, but we'll get to that.

Lex Fridman Podcast
#381 โ€“ Chris Lattner: Future of Programming and AI

Yeah.

Lex Fridman Podcast
#381 โ€“ Chris Lattner: Future of Programming and AI

So first of all, when we say that, we're talking about what's called CPython.

Lex Fridman Podcast
#381 โ€“ Chris Lattner: Future of Programming and AI

It's the default Python that everybody uses.

Lex Fridman Podcast
#381 โ€“ Chris Lattner: Future of Programming and AI

When you type Python 3, that's typically the one you use, right?

Lex Fridman Podcast
#381 โ€“ Chris Lattner: Future of Programming and AI

CPython is an interpreter.

Lex Fridman Podcast
#381 โ€“ Chris Lattner: Future of Programming and AI

And so interpreters, they have an extra layer of bytecodes and things like this that they have to go read, parse, interpret, and it makes them kind of slow from that perspective.

Lex Fridman Podcast
#381 โ€“ Chris Lattner: Future of Programming and AI

And so one of the first things we do is we move to a compiler.

Lex Fridman Podcast
#381 โ€“ Chris Lattner: Future of Programming and AI

And so just moving to a compiler, getting the interpreter out of the loop is 2 to 5 to 10x speedup, depending on the code.

Lex Fridman Podcast
#381 โ€“ Chris Lattner: Future of Programming and AI

So just out of the gate, just using more modern techniques.

Lex Fridman Podcast
#381 โ€“ Chris Lattner: Future of Programming and AI

Now, if you do that, one of the things you can do is you can start to look at how CPython started to lay out data.

Lex Fridman Podcast
#381 โ€“ Chris Lattner: Future of Programming and AI

And so one of the things that CPython did, and this isn't part of the Python spec necessarily, but this is just sets of decisions, is that...

Lex Fridman Podcast
#381 โ€“ Chris Lattner: Future of Programming and AI

If you take an integer, for example, it'll put it in an object.

Lex Fridman Podcast
#381 โ€“ Chris Lattner: Future of Programming and AI

Because in Python, everything's an object.