LevelUp
LevelUp
  • 42
  • 230 832

Відео

How to Train a Dragon* (Model)How to Train a Dragon* (Model)
How to Train a Dragon* (Model)
Переглядів 2083 місяці тому
♦ Instagram: level_uppp01 ♦ Twitter: badamczewski01
.NET Decompilation Tools Show & Tell (PowerUp).NET Decompilation Tools Show & Tell (PowerUp)
.NET Decompilation Tools Show & Tell (PowerUp)
Переглядів 2,4 тис.2 роки тому
Link to the PowerUP: github.com/badamczewski/PowerUp Link to SharpLab: sharplab.io/ ♦ Twitter: badamczewski01 0:00 Intro 0:50 SharpLab 2:20 PowerUp 4:05 ASM Documentation 5:30 Drawing Jump Guides 6:00 Short Addresses 8:50 Shorthands 9:50 Running Code 10:45 Benchmarking Code 13:00 IL Code Decompilation 13:40 IL Code Compilation 14:55 Class & Struct Layout 17:10 GO Decompiler 19:40 Outro
Inlining heuristics in .NET / C# can be hilarious sometimes.Inlining heuristics in .NET / C# can be hilarious sometimes.
Inlining heuristics in .NET / C# can be hilarious sometimes.
Переглядів 2,1 тис.2 роки тому
Inlining heuristics can be hilarious sometimes. The code is in C# / .NET, but similar things happen in other compilers. ♦ Twitter: badamczewski01
Short Animation about the Fibonacci Sequence and the Golden Ratio (And Generating The Golden Ratio)Short Animation about the Fibonacci Sequence and the Golden Ratio (And Generating The Golden Ratio)
Short Animation about the Fibonacci Sequence and the Golden Ratio (And Generating The Golden Ratio)
Переглядів 1,8 тис.3 роки тому
This video is a short animation about an interesting fact about the golden ratio and the Fibonacci sequence. People are asking me how I'm Morphing the text like that, and it's a project in C# that I'm developing but it's kind of a mess that I'm slowly changing into a library so here's the morphing code as a gist: gist.github.com/badamczewski/06d9c86e6d78fc79905f943cb3545f51 If you have question...
Data Transfer Speeds of Disks and Memory (How fast is it?)Data Transfer Speeds of Disks and Memory (How fast is it?)
Data Transfer Speeds of Disks and Memory (How fast is it?)
Переглядів 2,3 тис.3 роки тому
This video is a short animation that shows the performance of data access for various hardware components. In case you're wondering about what RAM means? The test was done using two PC-19200 DDR4 units from different computers. The CPU was i7-6700HQ People are asking me how I'm Morphing the text like that, and it's a project in C# that I'm developing but it's kind of a mess that I'm slowly chan...
What are Probabilistic Data Structures: Bloom FiltersWhat are Probabilistic Data Structures: Bloom Filters
What are Probabilistic Data Structures: Bloom Filters
Переглядів 25 тис.3 роки тому
This video will introduce you to Probabilistic Data Structures, and we shall cover a data structure called a Bloom Filter that's used to do efficient membership testing (if X is present in set S) Link to Bloom Filter Source Code: gist.github.com/badamczewski/42ec5d3aabd47c32684cdb87851f8a51 People are asking me how I'm Morphing the text like that, and it's a project in C# that I'm developing bu...
Data Structures: Introduction to Bit SetsData Structures: Introduction to Bit Sets
Data Structures: Introduction to Bit Sets
Переглядів 12 тис.3 роки тому
This video will introduce you to a Data Structure called a Bit Set. Small correction in (3:02) the 2nd-bit pattern for a number of 15 (001111) and not 23 (0010111) and the 4th 7-bit chunk has a number 40 (0101000) ♦ Instagram: level_uppp01 ♦ Twitter: badamczewski01 ♦ Blog: leveluppp.ghost.io The music in the video is licensed through Artlist.IO and I'm the license hold...
C# JIT Tier PerformanceC# JIT Tier Performance
C# JIT Tier Performance
Переглядів 2,4 тис.3 роки тому
In this video, we're going to put JIT Tiered compilation to the test (using C# programs) and see what's the performance difference between Tier0 vs. Tier1 vs R2R. Links to Videos: JIT Tiers Explained: ua-cam.com/video/BaFquQ9YZYU/v-deo.html Loop Cloning: ua-cam.com/video/zxcHkEu6aTY/v-deo.html Switch-Case Internals: ua-cam.com/video/soDX_IeZsqM/v-deo.html ♦ Instagram: level_uppp01...
C# JIT Decompilation Tips using WinDBGC# JIT Decompilation Tips using WinDBG
C# JIT Decompilation Tips using WinDBG
Переглядів 1,7 тис.3 роки тому
In this video, we're going to learn about a few C# and JIT decompilation tips using WinDBG. Here's an infographic that shows how to get to MethodDescriptor and to JIT asm code: badamczewski01/status/1314858587471130625 Link to discussion why Loops are not Quick JITed: github.com/dotnet/docs/issues/15143 Note: I've been able to produce code that's "MinOptJitted" for code that contain...
5 (Extreme) Performance Tips in C#5 (Extreme) Performance Tips in C#
5 (Extreme) Performance Tips in C#
Переглядів 74 тис.3 роки тому
In this video, I'm going to show you 5 performance tips (or tricks) that you can apply in order to make your C# code run faster. Everest Photo by Mário Simoes Attribution 2.0 Generic (CC BY 2.0): creativecommons.org/licenses/by/2.0/ flic.kr/p/HB3Ya6 ♦ Instagram: level_uppp01 ♦ Twitter: badamczewski01 ♦ Blog: leveluppp.ghost.io #csharp #dotnet #dotnetcore #performance #...
Spelunky 2 - No souls game has punished me this hardSpelunky 2 - No souls game has punished me this hard
Spelunky 2 - No souls game has punished me this hard
Переглядів 6153 роки тому
No souls game has punished me as hard as Spelunky 2 I hate it but I also love it. Send Help. #games #spelunky #game
C# If Else InternalsC# If Else Internals
C# If Else Internals
Переглядів 3,7 тис.3 роки тому
In this video, we're going to look at C# If Else Internals and what interesting things happen under the hood, and how they affect performance. Chapters: Into (0:00) If Inverted Jump (0:35) If Inverted Jump use case (7:48) If with a return (12:00) If with a throw (13:04) if with a throw helper (14:10) JIT branch elimination (17:26) JIT confused me :) (20:00) - Turns out that you don't need a fun...
C# Switch Case Internals #1C# Switch Case Internals #1
C# Switch Case Internals #1
Переглядів 2,6 тис.3 роки тому
This is video is the start of a brand new series of videos about C# / CLR internals. We're going to look at C# Switch Case Internals and what interesting things happen under the hood and how well it performs as compared to if-else statements. ♦ Instagram: level_uppp01 ♦ Twitter: badamczewski01 ♦ Blog: leveluppp.ghost.io #csharp #dotnet #dotnetcore #performance #jit #in...
Welcome to my ChannelWelcome to my Channel
Welcome to my Channel
Переглядів 1,7 тис.3 роки тому
I really hope you enjoy your time here & consider subscribing :)
Can you use static types as generic arguments in C#? (Joke Video)Can you use static types as generic arguments in C#? (Joke Video)
Can you use static types as generic arguments in C#? (Joke Video)
Переглядів 1 тис.3 роки тому
Can you use static types as generic arguments in C#? Let's find out :) ♦ Instagram: level_uppp01 ♦ Twitter: badamczewski01 ♦ Blog: leveluppp.ghost.io #csharp #dotnet #dotnetcore #performance #compiler

КОМЕНТАРІ

  • @rmcgraw7943
    @rmcgraw7943 5 днів тому

    You should do it in parallel, where your total number of partitions is the same as the number of channels supported by your CPU (4 or 8 most common I believe), but not greater than the number of CPUs available.

  • @lemdanful
    @lemdanful 15 днів тому

    It is not clear what capacity is? Because according to Wikipedia the probability of the error depends on count of inserted elements. So Wikipedia uses ‘n ‘ in computation of error’s rate where n is count of inserted elements.

  • @demesure9843
    @demesure9843 Місяць тому

    Very very interesting compilation of videos

  •  Місяць тому

    I loved the video, thank you very much for the explanations. Just to clarify my understanding, the copy problem when using a List<>. The problem would be because Parse is returning a List<> of structs and in the code below in foreach it would be copying the object to the loop's local variable? foreach (var line in lines) { sum += line.Amount; }

  • @FromRootsToRadicals_INTP
    @FromRootsToRadicals_INTP Місяць тому

    nice

  • @budiardjo6610
    @budiardjo6610 2 місяці тому

    wow, it is really powerfull.

  • @gerakore8948
    @gerakore8948 2 місяці тому

    what if instead of multiplying you fill up the whole integer with the first bit from the & 1 result and & that with p[x]

  • @user-vi7xn1tj9f
    @user-vi7xn1tj9f 2 місяці тому

    Great video. I would only recommend to work on a proper naming convention, as you named all of the tested methods with quite generic (nothing saying) names.

  • @feitoza.system
    @feitoza.system 3 місяці тому

    I want a course from you, bro... I am loving you series about C# and high performance coding

  • @Speedyrides2021
    @Speedyrides2021 5 місяців тому

    You can relate this to cryptocurrency

  • @user-wh1rc3bv4g
    @user-wh1rc3bv4g 5 місяців тому

    Ставлю полтос что автор русскоговорящий)))

  • @mumk
    @mumk 6 місяців тому

    Wow thank you so much, all solid performance tips, cheers

  • @taddeustentakel8598
    @taddeustentakel8598 9 місяців тому

    Why is the array of bytes 20 bytes long when u have 4 ints in them? 4x4byte I thought it is?

  • @native-nature-video
    @native-nature-video 9 місяців тому

    Why not just use C for performance? Code readability is more important than extra 30 milliseconds

  • @HikingUtah
    @HikingUtah 10 місяців тому

    for (int i = 0; i < array.Length; i += 2) sum += array[i];

    • @stefanalecu9532
      @stefanalecu9532 2 місяці тому

      Which would be great if not for the fact you're only using half of the elements. Did you mean sum += array[i] + array[i+1]?

    • @HikingUtah
      @HikingUtah Місяць тому

      @@stefanalecu9532 He was talking about only adding the odd-numbered values. That's what my code does without branching.

  • @panic_seller
    @panic_seller 11 місяців тому

    after spending time in the LeetCode Community, always force a HashMap at the problem🤣🤣

  • @FriedMonkey362
    @FriedMonkey362 11 місяців тому

    You're ruining readability, but atleast its a second faster

  • @sirakghazaryan5272
    @sirakghazaryan5272 Рік тому

    great work and explanation, but it would be better without the background music

  • @Zooiest
    @Zooiest Рік тому

    There's a potentially faster version of your no-multiplication bit hacks: // For n-bit integers, use a shift of (n-1) counter += value & (value & 1) << 31 >> 31; To explain it, I'll use 8-bit integers for brevity: 1. (value & 1): is the value odd? 2. << 31: move the pseudo-boolean value to the sign bit 3. >> 31: perform a sign-extending(!) shift to the right, essentially creating a move mask 4. value &: use the move mask to either zero out or keep the value It'll look something like this: Value: 5 1. (0b00000101 & 1) = 1 2. 1 << 7 = 0b10000000 3. 0b10000000 >> 7 = 0b11111111 4. 0b00000101 & 0b11111111 = 5 Value: 6 1. (0b00000110 & 1) = 0 2. 0 << 7 = 0 3. 0 >> 7 = 0 4. 6 & 0 = 0 This method eliminates not only the multiplication, but also the subtraction. Would be interested to see if it's actually faster, though

  • @ar_xiv
    @ar_xiv Рік тому

    I was frankly suspicious of C# properties/accessors when I first learned of them, but they were so built into every example I came across that I figured there was something magical they were doing that I didn't understand. I've since just gone back to public fields as I find them easier to reason about. So much example C# code has a private backing field and a public property that just returns the private field (before the simplified get; set;).

  • @dawidknaz5855
    @dawidknaz5855 Рік тому

    I didn't know that Sam from LOTR knows C# XD :D

  • @nccnm
    @nccnm Рік тому

    Can you share you program that visualize bit expressions? Thanks

  • @CompilerStuck
    @CompilerStuck Рік тому

    The code highlighting is such a great idea! Well done :)

  • @Ruchir205
    @Ruchir205 Рік тому

    Is using span similar to using the pointer?

  • @__hannibaal__
    @__hannibaal__ Рік тому

    Bit or byte?

  • @tanishqvyas8387
    @tanishqvyas8387 Рік тому

    What editor was used to edit the video?

    • @LevelUppp
      @LevelUppp Рік тому

      I wrote my own piece of software to animate all of this

  • @lukelyu3264
    @lukelyu3264 Рік тому

    best animation, worst explanation in detail

    • @LevelUppp
      @LevelUppp Рік тому

      Agreed, would do it better now.

  • @anonymoususer3561
    @anonymoususer3561 Рік тому

    I have no idea what any of this means, clearly I'm still too green

  • @mohandeszalatan4576
    @mohandeszalatan4576 Рік тому

    The bug that you've mentioned at method B2 (8:06) seems not to be there anymore at .NET 7. However, the value of variable 'l' will be copied to eax register and it will be used later for the bound checking even though it's marked as unused at the front end code. And again thanks for the great video.

  • @mohandeszalatan4576
    @mohandeszalatan4576 Рік тому

    That was so insightful. Thanks for the great video.

  • @gerarldlee
    @gerarldlee Рік тому

    The presentation is top notch. =)

  • @julkiewicz
    @julkiewicz Рік тому

    Could you also make some videos about the differences in output on different operating systems? It seems like on Linux / Mac even the MS version of dotnet (the dotnet/runtime) essentially uses the merged in Mono under the hood. As a result a lot of code output and performance characteristics work completely differently to what happens in the WIndows world.

    • @LevelUppp
      @LevelUppp Рік тому

      I don't have a MAC, so only Linux would be possible.

  • @NullReferenceExcepti0n
    @NullReferenceExcepti0n Рік тому

    Kudos for the effort to create those videos Sir! It looks efortless but I know that this is a lot of work.

  • @rishitripathi5617
    @rishitripathi5617 Рік тому

    Video style toh bole toh ekdumm zhakaassss....

  • @Junior.Nascimento
    @Junior.Nascimento Рік тому

    Any use at this in a real word use case. Also if you really wants perfomance in this you can use: var sum = n/2 * ( 2*a + ( n - 1 )* d );

  • @NullReferenceExcepti0n
    @NullReferenceExcepti0n Рік тому

    Super, jeszcze szczeke zbieram z klawiatury! Dobry pomysl!

  • @aniketbhura6131
    @aniketbhura6131 2 роки тому

    how is this all done ? can you teach this or drop the sources for learning .

  • @abdelrhmanahmed1378
    @abdelrhmanahmed1378 2 роки тому

    in groupByLookup you dont deal with collisions,and when i see the imp of groupBy provided by Microsoft it look very similar to yours , so why the performance gap is hug ?!

  • @franciscoserrano7227
    @franciscoserrano7227 2 роки тому

    And the second part? (btw great video!)

  • @PendelSteven
    @PendelSteven 2 роки тому

    The fairly new SSD.M2 via PCI-Express 4 is about 7-8 GB/s actually.

  • @mfbx9da4
    @mfbx9da4 2 роки тому

    Why do you use k hash functions instead of extracting the kth bit from the output of one hash function?

    • @LevelUppp
      @LevelUppp 2 роки тому

      You need your value to have a sufficient overlap in the bit mask, thus to avoid any uniformity problems and distribution locality the easiest way is to use k different hash functions. There are a couple of tricks to get this down to just two hashes and generate the rest but it was out of the scope of this video.

    • @mfbx9da4
      @mfbx9da4 2 роки тому

      @@LevelUppp what kind of uniformity / locality issues can arise? Isn’t the whole point of a hash function that it distributes uniquely?

    • @TUMENG-TSUNGF
      @TUMENG-TSUNGF Рік тому

      @@mfbx9da4 ​What you describe is essentially still k hash functions. It’s just that every one of those k hash functions has the same first step and its second step is to take a different digit from the same number (the one generated from the first step, or the one hash function that you talked about)

  • @orterves
    @orterves 2 роки тому

    How to achieve high performance in C# : Rewrite it in C++

    • @7th_CAV_Trooper
      @7th_CAV_Trooper 2 роки тому

      Most developers will end up with worse performance in C++ because they can't even perform fundamental optimization in C#.

  • @NTTCode
    @NTTCode 2 роки тому

    In fact, we rarely use Array in real world. Furthermore we can use multitasking for CPU-bound tasks or asynchronous for I/O-bound tasks to improve performance

    • @7th_CAV_Trooper
      @7th_CAV_Trooper 2 роки тому

      you should use array as much as possible.

    • @DjoumyDjoums
      @DjoumyDjoums Рік тому

      We use arrays as much as possible, it's the fastest possible collection. Or ImmutableArray if we need the readonly part.

    • @antonio_carvalho
      @antonio_carvalho Рік тому

      Who's this "we"? Of course programmers use a TON of arrays.

  • @jacobslusser4232
    @jacobslusser4232 2 роки тому

    So awesome!

  • @MHjort9
    @MHjort9 2 роки тому

    There's a point where readability is worth more than a tiny bit of performance

    • @7th_CAV_Trooper
      @7th_CAV_Trooper 2 роки тому

      the point of writing high performance code is to flex in front of your teammates.

  • @IBITZEE
    @IBITZEE 2 роки тому

    good info,,, RLE/RLL was used in the first hard drives interfaces... ;-)

  • @IBITZEE
    @IBITZEE 2 роки тому

    very interesting... thanks!

  • @IBITZEE
    @IBITZEE 2 роки тому

    wow... such a good info tool...

  • @sabitkondakc9147
    @sabitkondakc9147 2 роки тому

    you're amazing Bartosz!

  • @Akmmmm001
    @Akmmmm001 2 роки тому

    This is a masterpiece.