Concurrent and Parallel Programming in Python

所在平台: Udemy

课程主页: https://www.udemy.com/course/concurrent-and-parallel-programming-in-python/

课程评论:没有评论

第一个写评论        关注课程

课程简介

**Python 并发与并行编程课程总结** 本课程旨在教授学员如何利用 Python 创建多线程、异步以及多进程程序,从而显著提升程序运行速度。 **课程亮点:** * **解决 I/O 密集型瓶颈:** 学习多线程和异步编程技术,有效解决程序在与其他资源通信时由于等待数据传输而产生的性能瓶颈。 * **实际项目演练:** 从分析潜在的性能瓶颈入手,逐步深入技术细节,并通过一个实际项目,学习如何构建一个多线程程序,实现从互联网抓取数据、解析并保存到本地数据库。 * **利用 CPU 资源:** 掌握 Python 的多进程机制,学会如何利用多核 CPU 来分散工作负载,克服 CPU 限制。 * **协同优化:** 探索如何结合多进程与异步编程,最大化 CPU 资源利用率,并最小化等待 I/O 响应的空闲时间。 **学习目标:** * 理解并发与并行的概念及其在 Python 中的应用。 * 熟练掌握多线程编程技巧,处理 I/O 密集型任务。 * 掌握异步编程,提升程序的响应速度。 * 学会使用多进程来利用多核 CPU 提升计算密集型任务的性能。 * 能够设计和实现结合多进程与异步编程的优化策略。 **额外资源:** 课程代码已托管在 GitHub,可在第一节课的链接中找到。

课程评论(0条)

课程详情

In this course you'll learn how to create multi-threaded, asynchronous, and multi-process programs in Python, so that you can make your programs run even faster.In applications communicating with other resources, a lot of time is spent just waiting for information to be passed from one place to another. You'll learn how to use multi-threading as well as asynchronous programming to speed up programs that are heavily bottlenecked by IO operations.We'll go through an introduction first of where potential speed bottlenecks come from as well as how we could solve these issues, and then we'll dive directly into the technical content and build out a multi-threaded program together that grabs data from the internet, parses, and saves it into a local database.Other programs may be more heavily affected by CPU limitations. We'll also learn how to implement multiprocessing in Python, the library that lets us use multiple CPUs in our Python code. With this we'll be able to spread our workload over all the cores available on the machine we're using.Finally, we'll also look to combine both elements, taking a look at how we can use multiprocessing together with asynchronous programming to get the most benefit for yourself, maximizing your use of CPU resources and minimizing time spent siting idle waiting for IO response.You can find the lecture code in the GitHub repository linked in the first lesson.

课程标签

0人关注该课程

主题相关的课程