No video

what is inlining? and how does it make code faster? (intermediate) anthony explains

  Рет қаралды 3,450

anthonywritescode

anthonywritescode

Күн бұрын

today I introduce the concept of "inlining" and how an optimizing compiler can use it to make code faster!
playlist: • anthony explains
==========
twitch: / anthonywritescode
dicsord: / discord
twitter: / codewithanthony
github: github.com/aso...
stream github: github.com/ant...
I won't ask for subscriptions / likes / comments in videos but it really helps the channel. If you have any suggestions or things you'd like to see please comment below!

Пікірлер: 8
@raidoung4100
@raidoung4100 2 ай бұрын
Anthony, you just jumped right to the answer i was looking for, it's an instant subscribe ;)))
@DavidDellsperger
@DavidDellsperger 2 жыл бұрын
it's funny when Anthony sees a red squiggle and ignores it
@MrMongoosesRawesome
@MrMongoosesRawesome 2 жыл бұрын
If python doesn't support inlining, how were you using it (as you mentioned at the top of the video)? Do you just mean instead of creating a function just having code without a function call?
@anthonywritescode
@anthonywritescode 2 жыл бұрын
I use the term to mean a lot of things like "this isn't a useful function, I would just inline it" -- like literally writing the source in the function instead of having a separate one
@jimratliff
@jimratliff 2 жыл бұрын
"Premature optimization is the root of all evil." - Donald Knuth
@JohnZakaria
@JohnZakaria 2 жыл бұрын
Why not inline everything, if it sounds so great?
@anthonywritescode
@anthonywritescode 2 жыл бұрын
it balloons code size, and in many cases would make the code slower (since it has to ~emulate scoping and such and would need a bunch of setup / teardown anyway). also you wouldn't be able to call external shared objects!
@anthonywritescode
@anthonywritescode 2 жыл бұрын
(though yes, there is lto which can enable some optimizations from shared objects)
finding and fixing test pollution! (intermediate) anthony explains #401
11:50
UNO!
00:18
БРУНО
Рет қаралды 4,9 МЛН
Harley Quinn's desire to win!!!#Harley Quinn #joker
00:24
Harley Quinn with the Joker
Рет қаралды 16 МЛН
py-spy saved our python 3.11 rollout (intermediate) anthony explains #568
13:48
Advanced Topics: Function Inlining
6:49
CoffeeBeforeArch
Рет қаралды 6 М.
Makefiles: 95% of what you need to know
1:01:53
Gabriel Parmer
Рет қаралды 119 М.
How Do Linux Kernel Drivers Work? - Learning Resource
17:02
LiveOverflow
Рет қаралды 545 М.
how do I make an empty generator? (intermediate) anthony explains #577
7:38
UNO!
00:18
БРУНО
Рет қаралды 4,9 МЛН