Why Python 3.11 is so fast | Guido van Rossum and Lex Fridman

preview_player
Показать описание
Please support this podcast by checking out our sponsors:

GUEST BIO:
Guido van Rossum is the creator of Python programming language.

PODCAST INFO:

SOCIAL:
Рекомендации по теме
Комментарии
Автор

Guest bio: Guido van Rossum is the creator of Python programming language.

LexClips
Автор

Never in my life did I think I'd listen to a lecture on computation of prime numbers from Guido van Rossum.

shambhav
Автор

It was a great privilege to listen to Guido van Rossum, thank you sir for your gift to the world, your invention has created opportunities for me and millions of others.

nedex
Автор

This interview reminds me of the issues I had in the 1980's speeding up the looping of my employer's implementation of the byte-coded language "Business BASIC"...FOR I / NEXT I loops defaulted to the case where the internal floating point format was used versus the 99.99%+ case of the 32-bit integer type...I still remember those Asm/C coding days fondly...Visiting in Chicago last summer, walking past a sideway cafe, one patron asked me to explain my custom T-shirt: "Only malloc() can set you free()".

carlschumacher
Автор

the trick about operator optimization sounds almost exactly like branch prediction. If you have a branch in your code and one path is consistently chosen, modern CPUs will just execute that path and then check afterwards if it was the right thing to do. It's really the exact same idea

harleyspeedthrust
Автор

This discussion did a really good job of speaking in a way that allows beginners to understand

stillwell
Автор

I got to say python father is such a nice guy to explain so much detail to him (so patiently)

pawmeowzing
Автор

That's why I love Lex Clips, it's not always fluffy for the general public. Even as a professional one can learn something from the speakers.

irrationalpie
Автор

That's why I like languages which do static type inference. It prevents run time bugs and errors and it runs faster while the programmer does not have to write type annotations. The compiler will tell you there is something wrong with the types when the original programmer is still around to understand what the problem is. Then he can fix it before it goes into production.

AlJay
Автор

Never in my life I imagined Python and fast computation in same sentence

thecompanioncube
Автор

The thing I really, really love about Python, being someone who very much prefers static typing and pre-allocating variables to keep memory structures simple & performance deterministic, is that Python doesn't hide pointers but in fact makes it part of the language, making C and Python kind of a match made in heaven when you want the best of a dynamic scripting language and the low-level performance of C or assembler.

Now that's a fucking long sentence.

rbus
Автор

I am learning coding in python at 51 just for fun with no prior coding experience nor use for it. As I suffer from ADHD, my ability to get distracted and waste time never ceases to amaze me. So it's been 4weeks and I am still at list comprehensions. I am not sure why I thought I would understand and relate to this interview :) But I still appreciate it. Now let me go and find something to waste time on.

danihasbini
Автор

3:39 "Well, actually 10 is divisible by 2" - I LOLd when I realized that Guido actually lives what he did with the original python: why memorize whether 10 is a prime, when you can quickly compute it in you head.

Martinit
Автор

10:56 That audible scoff during Guido's answer did not go unnoticed, Mr. Fridman.

CreamySpoon
Автор

I figured out by myself that root thing when I was in the first semester of CS and was trying different methods to generate prime numbers. It's what taught me programming logic the most. I used to write down the logic and the code on a notebook and think wow this is complicated, now It's pretty easy to think about those rules I figured out. I just realized I've come a long way.

brunobenetti
Автор

The problem with python is that the efficient type-static code needs to be written in C and put into libraries like numpy, then glued together using a 'glue' which is slow and type unstable. This means you are limited to using libraries in order to have an actual performant code, unless you want to get down to compiled code (which is not what most of the python user-base want or is capable of doing).
The solution to this is allowing optional typing in the glue (python), so that you can actively choose to make bad/slow (bust easy) code or good/fast (but harder) code. This is what languages like Julia have solved from the get-go, where both the high-performance kernel libraries and the dynamically-typed high-level scripts can be coded in the same programming language.

jordimanyer
Автор

Lex, please invite some of the Julia lang folk for a chat, like Alan Edelman, Chris Rackauckas, Jeff Bezanson, Stefan Karpinski, etc. I'm sure they'll have a lot of interesting things to say about elegant and performant language design.

vicktorioalhakim
Автор

Sounds to me like optional typing could help boost performance here… if the user specified a type, the interpreter skips the initial „not-keeping“ and assumes it is going to get that type every time.

curls
Автор

Guido: we planing to go up to 3.99
Lex: what happens after 99
Guido: probably just 3.100

🤣

MrAlanCristhian
Автор

simple is a complex subject.
I remember once a gold mining company hired me to optimize a fortran code.
the code was easy to understand but it was 1100 lines long, but besides taking several weeks to process large volumes of data, in some of these cases it crashed.
so I decided to take a different approach and instead of using arrays I used Lists.
The resulting prodigy had 117 lines and was 5 times faster, but if you don't know pointers in fortran it is much more difficult to understand the code.

manuelsuazo