How To Build A Fast Algorithm To Merge Lists

  Рет қаралды 712

Earthly

Earthly

Күн бұрын

Earthly ➤ earthly.dev/youtube
Tim Peters created TimSort for Python, and it's so fast in the real world most programming languages have now copied it. But here is how I beat it for at least one case, and what Tim thinks of my improvement.
Dive into the intricacies of Python sorting algorithms with this in-depth tutorial that explores the performance and algorithmic complexity of merging sorted lists. Discover the nuances of Python's Tim sort, a sophisticated algorithm that excels in real-world data scenarios, and learn about heapq.merge, a Python module function for efficient list merging. Understand the principles of adaptive sorting and how big O notation applies to Python list operations. Gain insights into optimizing Python performance by integrating native C code, enhancing integer sorting, and leveraging Python objects for more complex data types. This tutorial not only clarifies intuitive problem-solving in code optimization but also invites open-source contributions to further improve sorting techniques. Whether you're standing at your desk puzzling over a sorting issue or seeking to optimize your Python code's performance, this video is your gateway to mastering sorting algorithms in Python. Join the adventure of algorithm optimization and become proficient in high-performance coding with Earthly, the innovative build tool for modern developers.
Timeline
00:00 - Intro
00:22 - Merging sorted lists
02:31 - Python Implementation
03:39 - heapq.merge vs. sequence.sort
04:48 - Measuring performance
05:51 - Tim Sort
07:58 - Merge Sort Explanation
09:20 - Galloping Algorithm
10:56 - Tim Sort History
13:10 - Tim Sort Implementation
15:08 - Tim Merge Implementation
16:54 - Beating Tim Sort
20:11 - Hearing from Tim Peters
22:10 - Lessons Learned

Пікірлер: 3
@katherinespiess9224
@katherinespiess9224 Жыл бұрын
Great video, hope to see more of this type of content
@EarthlyTech
@EarthlyTech Жыл бұрын
Thanks!
@Geza_Molnar_
@Geza_Molnar_ 2 ай бұрын
👍👍👍👍👍
Python List Performance - The Ultimate Guide
15:49
Earthly
Рет қаралды 298
10 FORBIDDEN Sorting Algorithms
9:41
Ardens
Рет қаралды 813 М.
Red❤️+Green💚=
00:38
ISSEI / いっせい
Рет қаралды 28 МЛН
Khó thế mà cũng làm được || How did the police do that? #shorts
01:00
Became invisible for one day!  #funny #wednesday #memes
00:25
Watch Me
Рет қаралды 57 МЛН
Can You Draw A PERFECTLY Dotted Line?
00:55
Stokes Twins
Рет қаралды 112 МЛН
3 Levels of Sorting Algorithms - FASTEST Comparison Sort!
10:38
Awk Crash Course
40:38
Earthly
Рет қаралды 10 М.
Why I Quit the Scrum Alliance
7:58
The Passionate Programmer
Рет қаралды 11 М.
Premature Optimization
12:39
CodeAesthetic
Рет қаралды 771 М.
The FASTEST sorting algorithm: Part 1 - TimSort
13:03
Gaurav Sen
Рет қаралды 56 М.
The secret to making Golang error handling a breeze
13:46
Earthly
Рет қаралды 9 М.
Build your own Container Runtime
37:37
Earthly
Рет қаралды 6 М.
The Only Unbreakable Law
53:25
Molly Rocket
Рет қаралды 319 М.
Red❤️+Green💚=
00:38
ISSEI / いっせい
Рет қаралды 28 МЛН