Merken

Good news, everybody!

Zitierlink des Filmsegments
Embed Code

Automatisierte Medienanalyse

Beta
Erkannte Entitäten
Sprachtranskript
this the 1st Fourier is that these elements I can carry all banks boats planes in New England item entangle along the it and then you must work on of the upcoming altitude which is new compilers new version B and consuming meaningfully
it so in the news is gal faster across the board and you're you're programmed to run run faster when doing anything about right so that's a great and the bad news is that if you're interested in getting the best performance you can possibly get the your mental model about how you understand how your code works like what what code is that translate into and where the costs in different parts of your program what model is now out of date right Peter Norvig uh wrote a book a long time ago called parent paradigms of artificial cells programming which is not good is not efficient of this book but it has really interesting list but opposition nodes and 1 of these points which has stuck with me is that now the expert Lisp programmer and eventually develops a good efficiency model model of like what the code is doing and we need of data so if we look back at my 1 and in the bad old days near the approximate efficiency model you have your program would be the cost of the program is 0 and in a number of reductions in your program right so you have to basically count the number of open parentheses wallets noted to see like what is the cost my program in a plus by the 2 and 3 all this of course as well so we we use in the i plus 1 5 in the user same program right it's cheaper than in a plus 1 plus 2 3 and is no 1 left has more reductions in 1 right it's here well for Alaska's Gao 1 . 8 had a pretty simple interpreter and the system goes to 0 we got a compiler which not only made syntax-free as it should be the idea that the macro expansion is a runtime cost was a pre terrible thing to cringe are the way we made our programs and I wanted to go so that was not always well so we had a bit more an optimizer and the biggest part of optimization and and to 0 there is a partial evaluation and ongoing that in all that we got P of L so that means like some reduction is a community at compile-time and on compile-time so the cost of these 2 expressions same and there are a couple other changes in the runtime environment and materially affected the way program but in essence their your cost model and 2 0 is now how expensive is my program well in it's like how many instructions does it take to run maybe that's in something did not have a very good idea about is true like instruction instruction count and know your program there's not such a direct uh correspondence there you can inspect the effect of partial evaluation and your code and who here's here's the common optimize so the command of the rebel if your skin magazine of materialist in programmers in this endeavor for nothing tried it out like on expression to see what the what the partially reward you on expressions the other thing you use to inspect what what is the result of your compilation besides just finding the program is a disassemble which shows you the the my constructions of but Pumilus some talking about not constant programs meant PML partial valuation really does a lot of stuff right so we take this simple loop is adding numbers and counting down partial valuation removes entirely right and there's a lot of things in it function nineties in this thing does but it'll effectively unrolled loops tail calls are loops and so by mining tail calls up to a certain size of it and you know completely fold both iterative loops or recursive loops I can do all sorts of things but basically if it is able to do John 1 is able to see the definitions and see users and and see all the definitions and all the users a can make some some transmissions undergo to navigate a check out like optimize as
part of like the basic mental model of the cost of go and encounter chosen but we have no it isn't it is a similar and message in the and and that the cost of the program is open instructions but the transition from stains instructions gets it's more complicated now so you need a refresher model in this regard but there are many improvements of the of the green but the ones we focus on a stop improvements of kind and the sense of improvements are such that you might consider writing a program in a different way or understand your program head of away once you once you know these bits so here are not the ones and twos and focus on 1st of all the land that is not always a closure names don't even data alive we can do unlimited recursion that Valdez dramatically better you compilation and has a lawful friend and as unboxed arithmetic and going to all these points the 1st of all know Linda we know is a that's our tribe right know that's the thing that some of us have tattooed on their arms and as you know how we
identify ourselves and led and sometimes we think of like lambda expressions which define functions of narrowcasting for this is just a function expression right that and as late as a defines a function that function does this so exist in runtime and we saw an example before that loop that complete account and so we can take a look at like how can a land and the represented at 1 time at runtime like is it always a closure is it always a cost there's ever cost at all and if it does like what kind of course is that so it's going to be completely gone right like for example this I used it can be completely in line they can be kind to find which i'll explain it can be represented as a code pointer automated closure as you closure just 1 of the 5 things that a lender can be so non is is a very common thing actually so in our 1st case we have we combined our function to ask no expression in the body law expression doesn't a reference ethanol so partial evaluation reduces this directly to the to the body so that of 42 and I is gone right so lenses this runtime and in the 2nd case we have 2 variables 1 is like whether or not to call of the function so it launches as boolean false value and mean by the function F and then in the body of our let expression if the value of launch true then we call f and otherwise just kidding well being also sees through the launch and folds that branch and so on and bands of reasonable whole thing to to just and so that lenders a never used values uh there were used in any way will be removed vertebrae much the other way that appeared out and new transmission land in your program is back in learning which means it and heuristics are a bit tricky as to whether this happens not so if money is important you know that you need this to the online in the checking like the result of optimise C I what the transformation is so in this case for example it's the same as the previous 1 except for the hash t which is true and scheme as a launch value and so it falls to the value of applying this F procedure but in minds F right so the optimization and this code and run time will call launched the missiles right that f the the rotting land isn't there right it's an online so this is a really about soccer and that is kind of the talk entirely of but know that that's a 2nd way that that delta tremendous the 3rd way is a new way and altitude this is codified so and this 1 it's more complicated because we can use this nice source-to-source optimization representation that have come out to come optimized complication is when you take uh a function the whose callers are all known and you end which always returns the same place and you wire the call and return directly into the calling function well accommodated so on and it asserts an example here is the countdown and instead writing in England and expanded out like defining you actually see the land and there's a land is going to become divide this example and we see has 2 colors so it has a collar and the end of the body is a tail recursive call and and it has a collar which uh starts off mental operations so I if I do a disassembly of this and and to see the effect of many of these oppositions and and showing some this is something I don't try and don't feel like you have to understand all understand point out the relevant bits of it and this position the online so this is something you're interested in and look at later so the point being is this loop has been in lines to buy jumps mislead the odds of break right so I'm basically doing these 4 instructions and loop in the in the count on the provisional is no and the right so what it was happened here the loop was codified the into its caller then 1 caller from outside it and see I think in the end more In this and 1 color from outside and the only call from inside it was a jump back to the beginning so is different and lighting copies of the body of a function and specialize it to the arguments of words mean called an 90 can happen in multiple call sites the connotation rewires of the function entry and the function exit so uh convocation of enlightened very tricky right out of your work and in Linas before but they're like I rabid animals that when you choose you know barely restraining on a chain or something 1 cause code growth in all of your compiler publications are like that it's always optimization and never causes Congress because you just instead of calling out of this function you're not actually incorporating its body into its color and because you do that you enable more optimizations because you turn is high order flow graph into a first-order flowgraph it's kind of complicated but just know that you're if you call a function and it always returns to the same place always returns the same continuation is 1 these is it's called codification then it will be codified it will be wired directly into its color and a very reliable opposition wanting feel when this is going to happen you can expect that it's going to happen so the next representation is to be a code point and the thing is I had the defeat uh PML here in this case and the issue is that if if the function and working on is too small then it will be in inlined injuries units collars on making bigger by telling a story about my chickens and that names they can have so I have this function and it's going be represented as a code pointer and we can see it's called from 3 places outside of body so it's not called with the same continuation like this 1 continues to here this 1 continues so 0 is not accounted for codification right so but what what happens in this function well I think and do a disassembly of it and I see that I see this Assembly printing for outside function and this simply running from the inside function that means there are 2 functions right is not an codified that's where you we see from this could not match the testing to be tested OK and then if I look at the call it's it's replace this indirect call this call label undergoes an offset and this is a faster call because we know that the procedure offsets uh and it can only happen where all of the colors of the functions were dealing with enough but this is the real optimization with the code pointer you never need the value of that log procedure so all of the vector should again like it's never necessary that I'm build a procedure object for long right and for that reason I can't I can't I can't call it by the code pointer and then then we can use a different representation procedure as a value the Gao currently has a uniform calling convention where so that the thing being called the colonies passes a zeroth argument and then the positional arguments are passed and like on a 2nd order like that and so the 0 1 is a colleague but we don't need to build the closure to pass of passes a collie we can use a different representation of for the free variables of this function so that doesn't have any free
variables we'll need fascinating meticulous reaction person a false value this happens we achieved value make it has 1 free variable we did allocate closure we can just pass and that free variable as the closure and then inside the log function it will reference that argument 0 to reference the value the free variables has a laconic a then the essence is of closures can be cheaper than big objects with the code pointer and all of the all the free variables with 2 variables we use a parent who happens to be smaller with 3 or more we stuff the free variables in a vector basically we're of representing the free variables of function as an object which is not a closure and then passing specialize on 0 and this can happen for a mutually recursive set of procedures as well we take the union of all of the the variables of all the functions and you represent them is 0 is that 1 is it 2 is 3 might be in a specific way uh and that way it it's is improved no if not all of the colors are lexically invisible then we do create a closure closure is an object on the shape it has a tag indicating closure and has a code point and has a free variables so you have to create the subject although if there is no free variables you don't endocrine every time you can just statically allocated binary and you can if you have 1 entry into a set of mutually recursive functions you can use just 1 closure for for all of them if the other one's colleagues all it is counted as you're interested of point should paper that describe those OK now competent
no and I'm very little time so I would just point out the my goodness knows people find that they rule
and I hope no 1 thing
that the then you will notice it as a difference with the 2 and and to 0 if the value is ever allocated to a local variable slot right within the scope of up within its scope you'd be kept alive and particularly this was a case for a procedure arguments so like he would call a function and then the arguments that procedure would be always kept alive and the function but that's not that's not the case that this is to preserve the public called being safer space meaning it never got will never retain memory anymore it is no longer necessary in the course of your program is free to reuse that slide it's free collect its value if it hasn't reuse that but garbage collection happens at some point so you should never feel like you need to like no allowed any value or something just releases member anymore because now no longer holds on to values just because they have names this is a property of the new compiler instructions really 5 minutes now this non 54 I have I have 6 minutes I'm How come on don't in OK my yet so that that that that is is that we need you back tracing down to 2 you won't see as many arguments and this is a kind of negative thing I don't know whether to introduce a new compile fighter something the nature preserves the values of arguments so that you get a nice backtrace will replace it with an underscore speech deal of because it could be the garbage collection happen arguments gone for the slot was really for something else the odds I only when this was also signed out to 0 mm your stack have limited size right 64 thousand elements you can say environment variable so if you want be bigger or not the once you reach the end we're done right well endowed to to the stack has unlimited size it's super and so whenever you need the group the stack it will like allocated stack area and copy in 1 of the shrinks at some point the return those pages to the operating system and this provides the closure organizations made it free then meant map as of now nice recursive functions and that fixed axis of other problems relating to if you capture the continuation in the maps procedure and it that's also another message and used as there so yeah know this is that the many on now we do a great limp compilation now like it's is pretty good name became better but I will do it it's a startling change compared to go to 0 I and that includes like wasting in different sorts of the transformations footprint in small areas to be not on this machine down to 0 stands up at 13 have MS and out 7 have uh 3 . 4 megabytes overhead down to to note down to 0 and only 2 handouts to children's per-process overhead of having a couple processes out there so I that this can make it much more parcel for like talk here the point out my organization because it's still and sets of quickly and has low over and everything and plus we now just design and some unboxed arithmetic where weekend uh work on floating point values without having allocate the money he has caching for that we're ever doing this now but understandable as well like when every worker floating point numbers you'd be like these bolded things run pulling a 32 bit float on the by vector and I'm multiplying tends to be bolded things allocating new objects so you're going through this loop and every will be allocated to objects you doing like this indirect so take dispatch on all of the mobile occasions in the references in all of these now that's only case and if I take a look at the difference in times it's 10 x 10 x like that so that the and it is a little loop we have needed on all not latinisms coming up an index also got box as a 64 bit integer so that something things a yeah it's in detail now about the place about recently but yet so the same model 0 and instructions the instructions themselves are cheaper and mapping of scheme to instructions as the more complex if you mean peak performance you got trigger peace with how common disassemble at some point but if you don't just you know enjoy the job performance so how I think I'm gonna thank you for this would be dealing with a whirlwind any questions this of the 2 of the authors that she I want you to be can you all creation quality of the water we still have many maps of the variables that are available right the variables which alive but fewer variables might be alive and you might have a different set of variables in a different set of temporaries as well so it can still different but I don't know I feel it's OK but you have to say this could it what the units of time
Ebene
Verschränkter Zustand
Compiler
Versionsverwaltung
Element <Mathematik>
Computeranimation
Resultante
Programmiergerät
Bit
Punkt
Algebraisch abgeschlossener Körper
Minimierung
Compiler
Iteration
Zählen
Gesetz <Physik>
Computeranimation
Eins
Arithmetischer Ausdruck
Bewertungstheorie
Programmierparadigma
Lambda-Kalkül
Expertensystem
Interpretierer
Konstruktor <Informatik>
Multifunktion
Approximation
Güte der Anpassung
Laufzeitsystem
Systemaufruf
Programmierumgebung
Partielle Differentiation
Funktion <Mathematik>
Rechter Winkel
Makrobefehl
Message-Passing
Algebraisch abgeschlossener Körper
Subtraktion
Gruppenoperation
Mathematisierung
Zahlenbereich
Zellularer Automat
Nummerung
Code
Loop
Informationsmodellierung
Knotenmenge
Konstante
Vererbungshierarchie
Optimierung
Schreib-Lese-Kopf
Leistungsbewertung
Soundverarbeitung
Expertensystem
Datenmodell
Rechenzeit
Datentransfer
Mailing-Liste
Physikalisches System
Fokalpunkt
Ordnungsreduktion
Quick-Sort
Codec
Teilauswertung
Loop
Offene Menge
Betafunktion
Mereologie
Makrobefehl
Wärmeausdehnung
Rekursive Funktion
Steuerwerk
Neuronales Netz
Resultante
Bit
Punkt
Algebraisch abgeschlossener Körper
Compiler
Minimierung
Hochdruck
Selbstrepräsentation
PASS <Programm>
Benutzerfreundlichkeit
Zählen
Systemzusammenbruch
Gesetz <Physik>
Computeranimation
Eins
Freeware
Arithmetischer Ausdruck
Wechselsprung
Einheit <Mathematik>
Autorisierung
Code
Gruppe <Mathematik>
Kontrollstruktur
Punkt
Lambda-Kalkül
Analytische Fortsetzung
Gerade
Expertensystem
Softwaretest
Parametersystem
Lineares Funktional
Nichtlinearer Operator
Shape <Informatik>
Freier Parameter
Physikalischer Effekt
Heuristik
Globale Optimierung
Systemaufruf
Nummerung
Zeiger <Informatik>
Variable
Systemaufruf
Algorithmische Programmiersprache
Teilbarkeit
Invariante
Arithmetisches Mittel
Verkettung <Informatik>
Funktion <Mathematik>
Menge
Rechter Winkel
Disassembler
Bildschirmsymbol
Faltung <Mathematik>
Ordnung <Mathematik>
Lambda-Kalkül
Algebraisch abgeschlossener Körper
Subtraktion
Web Site
Ortsoperator
Regulärer Ausdruck
Transformation <Mathematik>
Nummerung
Code
Loop
Variable
Multiplikation
Globale Optimierung
Hash-Algorithmus
Zählen
Vererbungshierarchie
Gleichmäßige Konvergenz
Optimierung
Zeiger <Informatik>
Gammafunktion
Leistungsbewertung
Transinformation
Entscheidungsproblem
Graph
Analytische Fortsetzung
Verzweigendes Programm
Datentransfer
Rechenzeit
Vektorraum
Datenfluss
Codec
Objekt <Kategorie>
System F
Loop
Wort <Informatik>
Boolesche Algebra
Prädikatenlogik erster Stufe
Kantenfärbung
Rekursive Funktion
Compiler
Steuerwerk
Brennen <Datenverarbeitung>
Metropolitan area network
Algebraisch abgeschlossener Körper
Güte der Anpassung
Datenmodell
Systemaufruf
Variable
Computeranimation
Keller <Informatik>
Homepage
Hydrostatik
Bit
Punkt
Algebraisch abgeschlossener Körper
Natürliche Zahl
Compiler
Programmverifikation
Gruppenkeim
Kartesische Koordinaten
Element <Mathematik>
Systemzusammenbruch
Raum-Zeit
Computeranimation
Homepage
Freeware
Negative Zahl
Einheit <Mathematik>
Prozess <Informatik>
Speicherabzug
Punkt
Analytische Fortsetzung
Betriebsmittelverwaltung
Parametersystem
Lineares Funktional
Prozess <Informatik>
Kategorie <Mathematik>
Stellenring
Nummerung
Inverter <Schaltung>
Variable
Algorithmische Programmiersprache
Rechenschieber
Menge
Rechter Winkel
Automatische Indexierung
Ganze Zahl
Festspeicher
Schwimmkörper
Disassembler
Overhead <Kommunikationstechnik>
Programmierumgebung
Message-Passing
Algebraisch abgeschlossener Körper
Subtraktion
Regelung
Quader
Selbst organisierendes System
Wasserdampftafel
Mathematisierung
Zahlenbereich
Sprachsynthese
Transformation <Mathematik>
Nummerung
ROM <Informatik>
Homepage
Loop
Virtuelle Maschine
Variable
Informationsmodellierung
Ganze Zahl
Netzbetriebssystem
Vererbungshierarchie
Optimierung
Autorisierung
Analytische Fortsetzung
Indexberechnung
Vektorraum
Quick-Sort
Keller <Informatik>
Objekt <Kategorie>
Mapping <Computergraphik>
Flächeninhalt
Loop
Overhead <Kommunikationstechnik>
Lateinisches Quadrat
Compiler
Speicherbereinigung
Brennen <Datenverarbeitung>

Metadaten

Formale Metadaten

Titel Good news, everybody!
Untertitel Understanding Guile 2.2 Performance
Alternativer Titel Good news everybody Guile 2 2 Performance notes
Serientitel FOSDEM 2016
Teil 95
Anzahl der Teile 110
Autor Wingo, Andy
Lizenz CC-Namensnennung 2.0 Belgien:
Sie dürfen das Werk bzw. den Inhalt zu jedem legalen Zweck nutzen, verändern und in unveränderter oder veränderter Form vervielfältigen, verbreiten und öffentlich zugänglich machen, sofern Sie den Namen des Autors/Rechteinhabers in der von ihm festgelegten Weise nennen.
DOI 10.5446/31006
Herausgeber FOSDEM VZW
Erscheinungsjahr 2016
Sprache Englisch

Inhaltliche Metadaten

Fachgebiet Informatik

Ähnliche Filme

Loading...