Sort Visualizer Update - I made it about 1,000,000 times more optimized

Поделиться
HTML-код
  • Опубликовано: 12 дек 2024

Комментарии • 8

  • @bitonic589
    @bitonic589  3 месяца назад +4

    Okay so basically what I did:
    - For frames that would be too fast for you to see anyway at that speed, just skip them.
    Why try to render it at 96,203,103 frames per second when no monitor, or human eye can see it?
    Also the triangle at the end shows what happens if you set the speed too high. I don't recommend going over 600x
    Edit: nvm its fixed now

  • @paulchamberlain7942
    @paulchamberlain7942 Месяц назад +1

    Thanks for making such an awesome program!

    • @bitonic589
      @bitonic589  Месяц назад +2

      thx, if you have any suggestions please comment them bc I have no more ideas to add

    • @paulchamberlain7942
      @paulchamberlain7942 Месяц назад

      @@bitonic589 your videos have inspired me to start a simple visualisation using C++/SDL on my own LSD-256-radix sort implementation! I will comment again if I get any new ideas not already covered. The important line of my radix sort that avoids modulo divisions, and also avoids bit shifts and logical ands is:
      for ( auto i : input ) { count[ *((uint8_t*)&i + pass) ]++; }
      Where pass is the least significant byte as the radix.
      All good fun (as long as machine little endian lol )

    • @paulchamberlain7942
      @paulchamberlain7942 Месяц назад

      @@bitonic589 I just remembered I do have an idea! For the last 10 years or so we have lived in a world where CPU clocks didn't get much faster, but number of processing cores has increased instead. Therefore it might be interesting to try to make some multi threaded sorts to take advantage of all this extra processing power? I appreciate it might not change the visualizations much.

    • @bitonic589
      @bitonic589  Месяц назад

      @@paulchamberlain7942 Yes, I have tried this. You can scroll to the bottom to try Parallel merge sort. It utilizes multiple threads to merge multiple subsections at once. However, it is very laggy and I currently can't find any way to fix it, I assume it may just be that an internet browser can only go so far in using CPU resources. Great suggestion though

  • @陳娟娟-t6f
    @陳娟娟-t6f 2 месяца назад +1

    Ummmmm... So Sort Good!