ARRAYLIST VS LINKEDLIST

แชร์
ฝัง
  • เผยแพร่เมื่อ 15 มี.ค. 2024
  • In this one, we explore how ArrayLists and LinkedLists works at memory level and how scripting languages handle their "arrays."
    Sign Up to CodeCrafters:
    app.codecrafters.io/join?via=...
    Follow me on twitter:
    / coredumpped
    Follow me on Github:
    github.com/jdvillal
    Questions and business contact:
    contact.coredumped@gmail.com
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 255

  • @scheimong
    @scheimong 2 หลายเดือนก่อน +155

    20:34 Fuck I need that card in my wallet

    • @nxthingbutv0id958
      @nxthingbutv0id958 หลายเดือนก่อน +1

      Me too, I hope he sells it as merch one day

  • @naautilus0
    @naautilus0 2 หลายเดือนก่อน +46

    best animation quality yet, the pointer hell is somehow very understandable

  • @MrPilotStunts
    @MrPilotStunts หลายเดือนก่อน +11

    This is the single best video on the topic ever! When i was studying cs, our prof didn't even try explain how data is stored, he just moved on to using pointers, i had no previous experience with them and was like wtf are pointers. You put it all flawlessly into words AND animations, and a picture is worth a thousand words. Great video that brings so much clarity, every cs undergrad needs to see this. Thanks a lot!

  • @giankadev3026
    @giankadev3026 2 หลายเดือนก่อน +11

    What a spectacular video, I'm just creating my own programming language and this fits me like a glove.

  • @ezsnova
    @ezsnova 2 หลายเดือนก่อน +145

    baby wake up core dumped just uploaded

    • @yumyum7196
      @yumyum7196 หลายเดือนก่อน +1

      🤣lmao seriously tho

    • @ivankudinov4153
      @ivankudinov4153 หลายเดือนก่อน +6

      I prefer 'baby wake up core dumped'

  • @dzuchun
    @dzuchun 2 หลายเดือนก่อน +21

    yes, I am to watch a livestream of yours solving CodeCrafters challenges
    Jon had done the same a week ago with Git, and I watched through the entire thing. that was indeed really interesting, and I'd like to solve these myself too 😊

  • @AapoAlas
    @AapoAlas 2 หลายเดือนก่อน +29

    Nitpick: JavaScript engines typically do implement arrays as continuous blocks of data, and generally setting just one item at index 10k will then allocate up to that number (or more). They just have to pessimise the array for the holes in it.

    • @wil-fri
      @wil-fri 2 หลายเดือนก่อน

      I remember writing a filter and it was returning null items, you have to be very careful with JS

    • @about2mount
      @about2mount 2 หลายเดือนก่อน

      They use C++ struct arrays, not normal arrays, class arrays or vectors.

  • @rubenvanderark4960
    @rubenvanderark4960 2 หลายเดือนก่อน +7

    Just found your channel! Really happy to see you just uploaded. I love your intuitive visuals to explain all sorts of mechanics

  • @seid44
    @seid44 2 หลายเดือนก่อน +5

    absolutely one of the best channels out there right now. u go even more indepth than some of my college classes and make it seem easy. big ups bro

  • @michaelciccotosto-camp4033
    @michaelciccotosto-camp4033 2 หลายเดือนก่อน +2

    I remember really struggling with these sorts of topics when I was at university. These are some of the best explanations for OS/low-level programming concepts I've ever come across!

  • @stevebrownlee6141
    @stevebrownlee6141 10 วันที่ผ่านมา

    I absolutely adore JavaScript, but concurrently adore these videos. The quality is capital. I aspire to produce quality material like this.

  • @Firestorm-tq7fy
    @Firestorm-tq7fy 2 หลายเดือนก่อน +1

    Waited for this video after the previous teaser. Ur videos are the most accurate on the subject there are

  • @digggggg898
    @digggggg898 2 หลายเดือนก่อน +10

    Love the quality of the videos I will recommend other people in my class to them because they’re concise and easy to understand. Keep it up!

  • @biasedbit
    @biasedbit หลายเดือนก่อน +1

    Incredible work with these videos so far. Hitting all the key points at just the right level of detail. The animation work is just... * chef's kiss * Keep it up 🙌

  • @loic1665
    @loic1665 2 หลายเดือนก่อน

    I learn so much deim your videos!! Thanks a lot !!! I'm waiting for the next one!

  • @deathdogg0
    @deathdogg0 2 หลายเดือนก่อน

    I wasn't able to leave a comment on your post from yesterday but I guessed arrays and I was right! I love these deep dives

  • @knofi7052
    @knofi7052 หลายเดือนก่อน +1

    George, your videos are really awesome! I already knew all these concepts but I have never seen them better explained. Anyway, I love C and Assembler because they are teaching how computers work...😊

  • @sameerakhatoon9508
    @sameerakhatoon9508 12 วันที่ผ่านมา

    you've mentioned about thinking to solve codecrafters challenges on stream.
    Yes please!

  • @mariospada00
    @mariospada00 2 หลายเดือนก่อน +11

    Thank you so much for this video, excellent explaination! I have a question, though: as you showed, in languages like Rust, besides specifying the array's size, it's also necessary to specify the data type (integer, float, etc...), and from what I understood, it's because this way the compiler already knows how many bytes to read for each element. However, at 19:45, in the case of Python, how does the interpreter know if, once a pointer is dereferenced, the retrieved object is an integer, a string, or another element with indefinite length? Because according to your (beautiful) animation it seems like every object has it's own specific size.

    • @CoreDumpped
      @CoreDumpped  2 หลายเดือนก่อน +15

      Interpreters attach 'tags' to values in memory, so when the value is needed, it first reads the tag to identify the type of the value and know how many bytes to read.
      The answer is explained in my video: The size of your variables matters.

  • @code-monet9468
    @code-monet9468 2 หลายเดือนก่อน

    One of the best videos I ever watched in my life

  • @Albert-nc1rj
    @Albert-nc1rj 2 หลายเดือนก่อน +1

    Amazing as always
    Would love to watch those streams

  • @kienha9036
    @kienha9036 2 หลายเดือนก่อน +3

    About 17:45, I'm no great expert on system programming, but the severity of data locality is unlikely severe. The cost of pointer-based array instead of a template array resides in the unpredictable position of object allocation, which confuse the CPU cache prefetcher. In reality, most workload allocates objects (as each object in the containing array) closely or in a predictable fashion, so prefetching works adequately well. And of course, pointers are still grouped together as always.
    For example, if we add items to a list in a loop, it is trivial for the CPU prefetcher to assume the next approriate location. Hotspot specifically, each thread has its own thread heap, so as long as the array/list is not multithreaded (which is unlikely), the pattern will be maintained. Moreover, with the nature of GC, the compacting phase will very likely move spreaded objects all over the heap to a single location, both avoiding fragmentation and maintaining the fetch pattern.
    There are exceptions, like if a BaseType array could contain both DerivativeType1 and DerivativeType2 with completely different object layout (only possible with reference-based array), then it's difficult for the CPU to make a good sense of the fetch pattern, which will likely suffer from "data locality". But as always, the template array would also suffer from this, so it's rather an unfortunate universal technical difficulty.

  • @Hersonrock12
    @Hersonrock12 หลายเดือนก่อน +1

    I did try to use the *void pointer once! It was hilarious when you mentioned it

  • @ZeroUm_
    @ZeroUm_ 2 หลายเดือนก่อน +4

    I've been working with Java for almost 20 years, and I don't think I've ever thought about what happens when you remove an element from an ArrayList.
    Thanks for the eye opener.

    • @SoniaHamiltonSnowfrog
      @SoniaHamiltonSnowfrog 2 หลายเดือนก่อน

      Me too, but with Go. Now I understand the motivation for slices vs arrays

  • @azadomer5273
    @azadomer5273 2 หลายเดือนก่อน +1

    I recommend everyone starting to understand the data structure to subscribe this channel and save this video, well done very nicely demonstrated!

  • @D0Samp
    @D0Samp 2 หลายเดือนก่อน +1

    I have yet to see the combination of a linked list and array list in the wild that I was taught in my AlgoDat course and never again afterwards. It stored the data in a big array that can be relocated to grow, but also a separate mapping from indexes to array offsets. That sounds like a linked list (just with array indexes instead of full pointers) that enforces some form of memory coherence for both list nodes and data. As far as I know, you can refine this concept to a linked list of array slices, which is how text editors support efficient cutting and pasting of text.

  • @Blezerker
    @Blezerker 27 วันที่ผ่านมา +1

    Javascript bashing ✅
    Engaging and interesting systems programming content ✅
    Funny retorts for armchair programmers ✅
    Im so glad i found this channel early and subbed

  • @SPimentaTV
    @SPimentaTV 2 หลายเดือนก่อน

    What a fantastic video! Now all I want is to program in Assembly to learn how really an computer works, and to optimize all those inefficiencies those languages introduce!
    Great presentation 👌

  • @pedroivog.s.6870
    @pedroivog.s.6870 2 หลายเดือนก่อน +1

    Hi, the video has been pretty interesting so far. Just a suggestion: please put the link to the previous videos you recommended. Otherwise, in a year or so, it will be much harder to find. Unfortunately, TH-cam showed exactly where the current video is in the channel's timeline.

  • @user-do1eg2kt3v
    @user-do1eg2kt3v 2 หลายเดือนก่อน +1

    Very good video, this is the kind of teaching that works for me so thank you

  • @eddyvytime
    @eddyvytime 2 หลายเดือนก่อน +1

    this content is pure gold!

  • @krystofjakubek9376
    @krystofjakubek9376 2 หลายเดือนก่อน +16

    It should be pointed out that the cache behavior of linked lists is NOT inherit to the linked list structure but rather to the allocator used to allocate the nodes. If we have an allocator allocators linearly the nodes will be located in memory in exact the same way as with the array. Alternative approach is to store enough elements in each node so that a full cache line is always used. Removal and addition from the middle of a node can be solved with splitting and merging.
    Also I am certain that pretty much all javascript interpreters really do use arrays whenever possible and only resolve to hash map as a fallback when the wasted size is too much or keys are some other type than numbers. This is not too difficult to implement internally and the performance boost is significant.

    • @huben_1337
      @huben_1337 2 หลายเดือนก่อน

      This is very important to note. I also think iv read v8 uses property access for very small and likely to not be modified arrays. This way it can do direct property access without hashmap lookup or array indexing.

  • @sergeylypko5817
    @sergeylypko5817 หลายเดือนก่อน

    The content is great.
    Would be interesting to see your overviews about how rust's compiler works and about compilers theory in general. As well as interpreters actually.

  • @lukasaudir8
    @lukasaudir8 10 วันที่ผ่านมา

    The quality of this channel is amazing, I wish you all the success and I'm excited to see many more interesting and educative videos like yours, you have a good way of getting your point across... I'm a

  • @pritonce6562
    @pritonce6562 2 หลายเดือนก่อน +10

    More reasons to hate JS :D
    (And yes to the streams)
    Also if you intend to expand your community on other platforms a discord server might be a good idea too.

  • @diogenes_of_sinope
    @diogenes_of_sinope 2 หลายเดือนก่อน

    Great videos, thank you for your efforts!

  • @ShubhanshuMishra
    @ShubhanshuMishra 2 หลายเดือนก่อน +19

    You are back🎉

    • @labCmais135
      @labCmais135 2 หลายเดือนก่อน +1

      Yes , really good

    • @silloo2072
      @silloo2072 2 หลายเดือนก่อน +1

      Heeeesss baackkk

  • @ejon
    @ejon 2 หลายเดือนก่อน

    This channel is about to blow up🎉

  • @darkfllame
    @darkfllame 22 วันที่ผ่านมา +1

    that's why i propose all scripting languages should be pseudo compiled: the bytecodes are as specific as assembly instruction (not as much but you get it), and the generic stuff actually happens at "compile" time, every scripting languages should do that, even at the cost of longer "compile" time. I want to do one, but I struggle everytime when making the parser so you will probably never see that.
    Also in java, if it's not a primitive, it's an object, every arrays of non-primitives in java are arrays of objects, and you can verify it with the JNI.

  • @samaellovecraft
    @samaellovecraft หลายเดือนก่อน

    Thanks for the knowledge!

  • @JamyGolden
    @JamyGolden 2 หลายเดือนก่อน

    Wow, so informative, thanks so much. I’d watch a live coding session.

  • @johnabrossimow
    @johnabrossimow 2 หลายเดือนก่อน +3

    12:03 did you cousin also write a getter for "self.lenght" (of self.items[self lenght]) to be the same value as "self.length" ?

  • @nexby323
    @nexby323 หลายเดือนก่อน

    You are very good please continue like that and I will be happy if you touch on the assembly perspective of the things too 😄

  • @fdb-js5uh
    @fdb-js5uh 2 หลายเดือนก่อน +5

    Maybe it would be better to say that modern JS JIT compilers, like V8, often optimize arrays?

  • @weakspirit_
    @weakspirit_ หลายเดือนก่อน

    i love that little departure to interpreted language land

  • @sidreddy7030
    @sidreddy7030 2 หลายเดือนก่อน +3

    Omg I loved this video. Super cool to know how python’s list works under the hood. Can’t wait for what you’ve got next!

  • @sa-hq8jk
    @sa-hq8jk 2 หลายเดือนก่อน +1

    i recommended the first 3 videos in this series to some computer science students i was tutoring because i felt like they went in depth into these concepts, while at the same time using terms and concepts that beginner programmers are familiar with. i felt like this video used a lot more terms and concepts which might be difficult for beginner programmers to understand compared to the last three. i think this series would be better for introductory students if the smaller concepts mentioned in this video like data structures, time complexity, etc. had heir own video before having a video about dynamically sized collections

    • @sa-hq8jk
      @sa-hq8jk 2 หลายเดือนก่อน

      in other words i felt like the pacing in this series took a sharp turn that might be too overwhelming for me to be able to recommend it to other computer science students. judging by the pacing of the first three videos in this series, it seemed like these videos were attempting to cater toward beginner-intermediate programmers with around a year of experience, but this video didn’t come across that way, although i may be wrong in my assumption for the targeted audience of these videos

    • @someonespotatohmm9513
      @someonespotatohmm9513 2 หลายเดือนก่อน

      @@sa-hq8jk I think there is enough context to understand what a datatype is without giving the textbook definition of what a datatype is (which i doubt will be helpfull to anyone anyway). A definition of time complexity would probaply have been nice, it is easy to understand and aply in these cases and can also easily be googled if needed.

    • @sa-hq8jk
      @sa-hq8jk 2 หลายเดือนก่อน

      @@someonespotatohmm9513 i didnt mean what exactly a data type is, but more of how a struct is a type which combines other types, and how they are grouped together in memory and interpreted by the compiler and by memory

  • @elzabethtatcher9570
    @elzabethtatcher9570 หลายเดือนก่อน

    Amazing video. And thank you for not pedaling surfshark or some unrelated crap. Video bookmarks would be welcome!

  • @sashibhushanarajput1194
    @sashibhushanarajput1194 2 หลายเดือนก่อน

    This is incredible

  • @bobsprite6711
    @bobsprite6711 2 หลายเดือนก่อน

    Excellent!

  • @derDooFi
    @derDooFi หลายเดือนก่อน

    no need to be so self-conscious at the end there. this channel is great

  • @indiannews544
    @indiannews544 2 หลายเดือนก่อน

    You are doing revolutionary work bro
    Keep going ,keep posting more often

  • @randykamindo4795
    @randykamindo4795 2 หลายเดือนก่อน

    Amazing video!

  • @thecrazyeagle9674
    @thecrazyeagle9674 2 หลายเดือนก่อน +1

    What a gem of a channel. Keep it up!

  • @anon_y_mousse
    @anon_y_mousse หลายเดือนก่อน

    Thanks. I had always assumed ArrayList was just some sort of alias for a Deque, but now I know, it's just a dynamic array type. Java is one of those languages that I've avoided fully learning and any language that reuses that name for a container type too. As it is now, I probably have far too much knowledge of Java.

  • @kossboss
    @kossboss 2 หลายเดือนก่อน

    your content is 👑. my kids will study from this channel one day 🥹 and their kids 😇 and their kids kids for generations learning low level concepts and rust. 🥂

  • @bartekabuz855
    @bartekabuz855 2 หลายเดือนก่อน +99

    I would have never suspected that an IT person can actually explain something well enough for people to understand. Good job buddy

    • @tonchozhelev
      @tonchozhelev 2 หลายเดือนก่อน +43

      The reason why most programmers are bad at explaining things, is that they don't fully understand most of the things they would try to explain. And the reason for that, is that most of the time they were given a surface level explanation themselves, and they just accepted it.

    • @not_kode_kun
      @not_kode_kun 2 หลายเดือนก่อน +3

      ​@@tonchozhelev EXACTLY

    • @vimandmanyothers554
      @vimandmanyothers554 2 หลายเดือนก่อน +16

      Programmers and IT people aren’t the same

    • @not_kode_kun
      @not_kode_kun 2 หลายเดือนก่อน

      @@vimandmanyothers554 it shouldn't be the same, i agree, but sadly the line is very blurry these days. a lot of programmers nowadays have no real clue what their code is actually doing, all they care about is whether it works or not. this stems from the overly-corporate nature of the modern internet and digital world. as long as it gets them money on the short term, who cares if it's performant, well-written, robust code? the mindless consumers certainly don't, so why should the multimillion dollar companies care? sad world we live in

    • @3osufdh4rfg
      @3osufdh4rfg 2 หลายเดือนก่อน +11

      @@tonchozhelev I have en education in embedded systems and having watched all the few videos they've done so far I've already learned several important things that no-one bothered to explain about how different data-structures are implemented by the compiler and why/how that has significant performance implications.

  • @xyz-vrtgs
    @xyz-vrtgs 2 หลายเดือนก่อน

    Really great video, although I would have liked it if you talked about bounds checking in a normal array when you were talking about indexing out of bounds

  • @timur-yusipov
    @timur-yusipov 2 หลายเดือนก่อน

    Good content, thx!

  • @Darkev77
    @Darkev77 หลายเดือนก่อน +1

    Please do Hashmaps next and how are its elements linked and how does it look like in memory

  • @7th_CAV_Trooper
    @7th_CAV_Trooper 11 วันที่ผ่านมา

    Linked lists are for tape storage. Similar structures are used for block or heap storage.

  • @mhFFFFFF
    @mhFFFFFF 2 หลายเดือนก่อน +2

    “This explains why we use zero instead of one for the first element”
    What a hero 🙌. Finally a non-stupid “programmers just count from zero” explanation

  • @PedroShin
    @PedroShin 2 หลายเดือนก่อน

    amazing video!

  • @SoreBrain
    @SoreBrain 2 หลายเดือนก่อน

    This was indeed a banger

  • @mayureshpisat2274
    @mayureshpisat2274 2 หลายเดือนก่อน +1

    Thankyou so much for these videos plz keep making them they are so good

  • @abombfuenmayor
    @abombfuenmayor 2 หลายเดือนก่อน +1

    Excellent videos. Love your channel!

  • @KeshavKumar-gc9pu
    @KeshavKumar-gc9pu 2 หลายเดือนก่อน +1

    Very well explained, these kinds of animations are extremely useful.

  • @bruno-dv5qq
    @bruno-dv5qq หลายเดือนก่อน

    love your videos

  • @Method5440
    @Method5440 2 หลายเดือนก่อน +1

    I think when he says ‘and so Forth’ he’s actually telling us what programming language to use.

    • @silloo2072
      @silloo2072 หลายเดือนก่อน

      😂

    • @silloo2072
      @silloo2072 หลายเดือนก่อน

      We are 2 orange S

  • @stefanmladenovic2040
    @stefanmladenovic2040 2 หลายเดือนก่อน +5

    Yet another banger from project CD!

  • @c4cypher
    @c4cypher 2 หลายเดือนก่อน +2

    The Lua Table has entered the arena.

    • @VaughanMcAlley
      @VaughanMcAlley 2 หลายเดือนก่อน

      It would be interesting to see what Lua’s cache hit & miss rate is compared with other languages…

  • @AlleBalle54
    @AlleBalle54 หลายเดือนก่อน

    another great video

  • @liburnkrasniqi4003
    @liburnkrasniqi4003 16 วันที่ผ่านมา

    God please never stop making vids my guy AGHHHHHHHHHHH

  • @yeknomhtooms
    @yeknomhtooms หลายเดือนก่อน

    i wish i had the opportunity to access all these kind of videos when i was studing computer science!

  • @Darkev77
    @Darkev77 หลายเดือนก่อน +1

    @14:59, is it not possible in this case to move the first element to the right and then update the base memory address to its moved location?

  • @Boronesss
    @Boronesss 2 หลายเดือนก่อน

    which tools are you using to create these animations. looks pretty good

  • @sevos
    @sevos 2 หลายเดือนก่อน

    Man this animations
    Where were they for all these years?

  • @diyathkumara2443
    @diyathkumara2443 2 หลายเดือนก่อน +30

    The early bird gets the typo

    • @CoreDumpped
      @CoreDumpped  2 หลายเดือนก่อน +8

      Fixed, thanks :D

    • @diyathkumara2443
      @diyathkumara2443 2 หลายเดือนก่อน +3

      @CoreDumpped
      Thank you for all the effort you put into crafting explanations + animations even a newbie like me can grasp so easily 🙏

  • @Fowdre
    @Fowdre หลายเดือนก่อน

    I've been wondering for some time now, what do you use to animate your videos?

  • @shant0
    @shant0 2 หลายเดือนก่อน

    absolute mad lad

  • @jaya_surya
    @jaya_surya 2 หลายเดือนก่อน

    Thanks

  • @kiwiladi
    @kiwiladi 11 วันที่ผ่านมา

    excellent

  • @alfredomoreira6761
    @alfredomoreira6761 2 หลายเดือนก่อน +1

    Be aware that modern javascript engines optimises arrays if they have no holes (java like) and even more if they are of the same type (c like) : check for SMI, DOUBLE_SMI, HOLEY_SMI, etc js arrays.
    So modern js engines are no more just an interpreter but also a list of runtime JIT compilers run depending of the context of the running code (the more a bit of code is run the more it uses the most complex JIT compiler with the most optimisation).
    hence why js nowadays can be as fast as some compiled languages.

  • @drf289
    @drf289 2 หลายเดือนก่อน +1

    Your cousin may know more than me, but he still misspelled "length" in that code :P 11:50

  • @Darkev77
    @Darkev77 หลายเดือนก่อน +1

    Could someone kindly explain to me in depth and on a low-level 3:20? If ultimately all objects stored in memory (strings, ints, etc.) are just a sequence of bits at the end, how does the CPU differentiate (interpret) the binary sequence for the integer 65 and the binary sequence for the character "A"? Is there some "tag" that is associated with every variable that routes the variable to the correct processing unit within the CPU?

    • @weakspirit_
      @weakspirit_ หลายเดือนก่อน

      inherently all data that we use are indeed just a sequence of bits and bytes. the reason we have types in compiled systems languages is so that the compiler can use it to determine type information of something: the compiler can deduce the stack size, utilize packing for structs, ownership, etc. also reasoning about your code/instructions, from both the compiler and the programmer's perspective. you can think of types as a way to express something about the value associated to a name/symbol, i.e. "john" variable can contain a "Person" struct. you can also think of types as a property arising from restrictions/expectations of a data blob, i.e. think about a 7-bit character type that's actually allocated on a single byte.
      ultimately, there's nothing inherently low-level preventing from eliminating all types and treating everything as a generic sequence of bytes. but that is counterintuitive for the compiler and the programmer.
      edit: i implied this but to clarify, the processor doesn't know the type of a piece of data (well not exactly, but this is a good approximation for programmers). even instructions and pointers are data from the perspective of the processor.

    • @weakspirit_
      @weakspirit_ หลายเดือนก่อน

      also in interpreted languages, yes there are indeed tags attached to objects to keep track of the data they hold. i'm not aware if there's interpreted languages that doesn't use tags

  • @0-0_ora
    @0-0_ora 2 หลายเดือนก่อน

    what do you think about Fast LinkedList with algorithmic time complexity?

  • @yarrakobama3417
    @yarrakobama3417 2 หลายเดือนก่อน +3

    There‘s no way i was too lazy to comment „Dynamically sized data structures“ on yesterday’s post 😂 I had it 😭😭

  • @kleinmarb4362
    @kleinmarb4362 2 หลายเดือนก่อน +1

    Please do streams would be so nice

  • @keeprocking3620
    @keeprocking3620 2 หลายเดือนก่อน

    In Lua arrays are done the same way as in JS: they are in fact maps with values being indexed by numeric indices

  • @xBiggs
    @xBiggs 2 หลายเดือนก่อน

    I created a linked list in C with two levels of indirection with varying orders of magnitude up to a billion elements. However, I never got valgrind to report cache misses above 0.7% when pushing all, then accesseing all then popping all. I understand that valgrind will report a simulation of the cache rather than the actual cache, but it was the best I could do to measure because my kernel does not have perf.

  • @Nerdimo
    @Nerdimo 2 หลายเดือนก่อน

    If only I had you as my professor

  • @philtoa334
    @philtoa334 2 หลายเดือนก่อน

    Nice.

  • @young_oak
    @young_oak 2 หลายเดือนก่อน

    Thanks for your hard work!!!🎉

  • @MXtreme64
    @MXtreme64 2 หลายเดือนก่อน

    Couldnt you use a map to access elements in a linked list, and making the lookup time constant with that?

  • @devnarula6733
    @devnarula6733 2 หลายเดือนก่อน +1

    afaik js arrays are actual arrays and not hashmaps... you can do array.string_key = value because like everything else js array is ALSO an object, but it contains an array as well, you are just assigning a property to the array object. If you do array[12]=some_val to a new array you will see the length actually change but if you do array.string_key=val length does not change... so basically it is {[,,,,,,,,,,,some_val], string_key: val}, js engines optimize it anyways

  • @Lucas-md8gg
    @Lucas-md8gg 25 วันที่ผ่านมา

    What software did you use to create these screens and animations?

  • @DrakiniteOfficial
    @DrakiniteOfficial 21 วันที่ผ่านมา

    Despite its quirks I love JavaScript for many reasons, one of which is that we want better performance in arrays, we can use typed arrays.
    The hash map approach is quite clever IMO, since in most JS code you won't be looping more than a few hundred (or few thousand at the most) times in a normal array, and if you see doing more than that, then well, you should probably reconsider your approach.
    All about being the right tool for the job. And if JS is just too slow, you've got WASM. And if WASM is too slow.......... then ditch JS/WASM and build a native app. 🤣

    • @CoreDumpped
      @CoreDumpped  20 วันที่ผ่านมา

      Yes I agree, the right tool for the right job. What I really dislike is that people trying to convince the world that JS should be used everywhere.

  • @L1Q
    @L1Q หลายเดือนก่อน

    pointer arithmetic was baked directly into intel 8086 cpu instruction set, no wonder systems programming langugaes at the time would also reflect the feature in their syntax

    • @CoreDumpped
      @CoreDumpped  หลายเดือนก่อน

      Does this has anything to do with that take that I've been recently reading a lot claiming that C beats everything because CPUs are designed to be 'C-compiled code' efficient?

  • @lucianobestia
    @lucianobestia หลายเดือนก่อน

    May I give two thumbs up ?

  • @silloo2072
    @silloo2072 2 หลายเดือนก่อน +1

    Yes I want a stream!!!