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

Guido van Rossum

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

Appearances Over Time

Podcast Appearances

Lex Fridman Podcast
#341 โ€“ Guido van Rossum: Python and the Future of Programming

That's just the fact of life.

Lex Fridman Podcast
#341 โ€“ Guido van Rossum: Python and the Future of Programming

I didn't account for what should happen in that case in the way I told the story.

Lex Fridman Podcast
#341 โ€“ Guido van Rossum: Python and the Future of Programming

And so what we actually have to do is when we have the add integer operation, we still have to check...

Lex Fridman Podcast
#341 โ€“ Guido van Rossum: Python and the Future of Programming

Are the two arguments in fact integers?

Lex Fridman Podcast
#341 โ€“ Guido van Rossum: Python and the Future of Programming

We applied some tricks to make those checks efficient.

Lex Fridman Podcast
#341 โ€“ Guido van Rossum: Python and the Future of Programming

And we know statistically that the outcome is almost always, yes, they are both integers.

Lex Fridman Podcast
#341 โ€“ Guido van Rossum: Python and the Future of Programming

And so we quickly make that check and then we proceed with the sort of add integer operation.

Lex Fridman Podcast
#341 โ€“ Guido van Rossum: Python and the Future of Programming

And then there is a fallback mechanism where we say, oops, one of them wasn't an integer.

Lex Fridman Podcast
#341 โ€“ Guido van Rossum: Python and the Future of Programming

Now we're going to pretend that it was just the fully generic add operation.

Lex Fridman Podcast
#341 โ€“ Guido van Rossum: Python and the Future of Programming

We wasted a few cycles believing it was going to be two integers, and then we had to back up.

Lex Fridman Podcast
#341 โ€“ Guido van Rossum: Python and the Future of Programming

But we didn't waste that much time, and statistically, most of the time.

Lex Fridman Podcast
#341 โ€“ Guido van Rossum: Python and the Future of Programming

Basically, we were sort of hoping that most of the time we guessed right, because if it turns out that we guessed wrong too often,

Lex Fridman Podcast
#341 โ€“ Guido van Rossum: Python and the Future of Programming

or we didn't have a good guess at all, things might actually end up running a little slower.

Lex Fridman Podcast
#341 โ€“ Guido van Rossum: Python and the Future of Programming

So someone armed with this knowledge and a copy of the implementation, someone could easily construct a counterexample where they say, oh, I have a program and now it runs five times as slow in Python 3.11 than it did in Python 3.10.

Lex Fridman Podcast
#341 โ€“ Guido van Rossum: Python and the Future of Programming

But that's a very unrealistic program.

Lex Fridman Podcast
#341 โ€“ Guido van Rossum: Python and the Future of Programming

That's just like an extreme fluke.

Lex Fridman Podcast
#341 โ€“ Guido van Rossum: Python and the Future of Programming

I think that the heuristic is actually, we assume that the weather tomorrow is going to be the same as the weather today.

Lex Fridman Podcast
#341 โ€“ Guido van Rossum: Python and the Future of Programming

That is already so much better than guessing randomly.

Lex Fridman Podcast
#341 โ€“ Guido van Rossum: Python and the Future of Programming

Python is not the first language to do a thing like this.

Lex Fridman Podcast
#341 โ€“ Guido van Rossum: Python and the Future of Programming

This is a fairly well-known trick, especially from other interpreted languages that had reason to be sped up.