cinera_handmade.network/cmuratori/hero/code/code232.hmml

47 lines
3.8 KiB
Plaintext
Raw Permalink Normal View History

[video output=day232 member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Examples of Sorting Algorithms" vod_platform=youtube id=cq_PVCgyS5k annotator=Miblo]
[0:08][Share a link from yesterday's chat[ref
site="YouTube"
page="Computational Complexity"
url="https://www.youtube.com/watch?v=moPtwq_cVH8"]]
[1:54][Blackboard: Problem "difficulty" scale]
[12:59][Blackboard: Travelling Salesman Problem]
[22:37][Thank Longboolean for the link]
[24:17][Blackboard: Sorting]
[24:53][handmade_render_group.cpp: Note that the current SortEntries function is O(n^2)]
[25:17][Blackboard: Reiterate why we don't care about adding the n in Order Notation]
[26:56][Blackboard: Scaling only matters if you actually scale!]
[29:55][Debugger: Break into SortEntries and inspect the Count]
[30:39][Blackboard: The relevance of scale]
[32:57][Blackboard: "Worse case"]
[34:54][Blackboard: Why the default sort in the CRT is quicksort]
[37:16][Blackboard: More sorts]
[39:53][Blackboard: The expected running times for these sorts in the worst case]
[41:11][Blackboard: Quick sort]
[48:48][Blackboard: Picking your pivots]
[50:45][Blackboard: Using randomness to potentially improve the running time of algorithms]
[52:21][Blackboard: Radix sort]
[57:43][Blackboard: (Pseudo) Insertion sort]
[1:00:34][Q&A][:speech]
[1:01:28][@SnowyCrystalz][So why would you not always do radix sort with a sort(sizeof(<type>), data_)?]
[1:01:46][Blackboard: On using the most appropriate sorting algorithm for the dataset]
[1:12:12][@SvK151][Any news on potential Pat Wyatt guest stream to go more in-depth with the network stuff?]
[1:12:17][@fod669][Did you mention sort stability at all?]
[1:12:30][Blackboard: Sort stability]
[1:17:34][@Miblo][What else, if anything, do you think we'll need to sort besides the sprites?]
[1:17:51][@cubercaleb][Could we possibly generate / hint the ground chunks in such a way that using radix sort would be more optimal?]
[1:18:12][@Krohnos][Yes, it is proven, I'm pretty sure]
[1:18:56][@Longboolean][Is shell sort basically bubble sort with a variable span between values being compared (span decreases each run through)?]
[1:19:06][Blackboard: "Shell sort"]
[1:20:58][@MrSlick1015][Is this cross-platform yet?]
[1:21:46][@Dragonkinn02][Would something like a pivot table be a sort problem, or something else altogether? Is that more a sort / amalgamation / summarization?]
[1:22:04][@elxenoaizd][Off-topic: Which more do you like, the fixed-function API of OpenGL or the programmable one? I've been using the modern approach but reading examples from the fixed pipeline they seem to be a lot more intuitive and easier to understand the flow of things]
[1:22:37][@SnowyCrystalz][So by your description, is a stable sort resource intensive? Since it seems like it could be of max O(n^2*nlogn) depending on sort type? Since you have to run through the data twice?]
[1:24:11][@NoRaD91][When will you stop teasing us with the interactive fiction posts and get to the details?]
[1:24:20][@insofaras][Will you leave in some bugs for speedrunners to break the game with?]
[1:24:49][@Dragonkinn02][With a sort, is this actually adjusting and rewriting the data on the disk, or would it just be updating indexes or pointers? Just, once you sort, could you read start to finish, or is it pointer intensive: read 10 records, jump, read next 5, jump, read 2 more?]
[1:25:44][@NoRaD91][I mean, how you actually went about solving the problems, it seems so close for weeks, then... cliffhanger]
[1:27:01][@SnowyCrystalz][I read a post the other day that said syntax coloring is bad for programming practices and enforces skimming rather then understanding. Do you agree or not?]
[1:27:59][@NoRaD91][Now I know that I have to buy a game to find out, that's fine. Thank you]
[1:29:14][Wind down][:speech]
[/video]