HTML (pincha para descargar)
Extracto de la transcripción automática del vídeo realizada por YouTube.
alright cool so i'm i'm here to talk to you guys about benchmarks and what they are and why is it interesting and kind of useful to to have them or to like sort of start writing them i guess so a little bit about me i'm alex nova saudi and to cool
is hardware hardware is a big big problem because not a richly problem but you sort of have to be aware of that if you want to know or or reliably run benchmarks and have reliable results you better off having like it's you know server standalone server
what is going on right so for that I'll talk a little bit about compilers I just sort of a compiler compilers one to one thing this is this example is called constant propagation right so we're trying to benchmark here we're trying to benchmark
converting a string to a number and there's double dildo operator if you guys are to know that's just a an equivalent of parson so we have this constant a right and we're running thousand times a loop and then we measured the time which is log
it on the console right so it's kind of like simple right so this is the code that we're working with but compiler is kind of like smart so what it does it looks at the a and says well it's a constant right so I might as well just in line it right
that cool then it looks further and it goes well it's a constant and all you do you just basic converted in constant so I might as well just perform this operation once i'm just going to convert it once and it just going to line it again and at this
point your bench marketing that assignment cool all right so let's take a look at another example so it smart developer will look at that and says you know what let's let's make a a non-constant let me use data now to string so now using constant
anymore awesome right but compiler will take a look at that and say well you know what it's all good but I'm just going to hoist out that operations of conversion out of the loop I don't have to do it like many times right so I'm just going
to create a new variable and you are benchmarking the assignment again so it's totally not what you think is going on and even that is called loop invariant code motion when things are hosted out of the loop so it's all good and then compiler looks
[ ... ]
Nota: se han omitido las otras 1.933 palabras de la transcripción completa para cumplir con las normas de «uso razonable» de YouTube.