Skip to Content
고성능 파이썬(2판)
book

고성능 파이썬(2판)

by 오현석, 미샤 고렐릭, 이안 오스발트
May 2021
Beginner to intermediate
528 pages
11h 27m
Korean
Hanbit Media, Inc.
Content preview from 고성능 파이썬(2판)
373
9
multiprocessing 모듈
9.8
마치며
이번 장에서는 많은 내용을 다뤘다. 먼저, 당황스러울 정도로 병렬적인 문제 두 가지를 살펴봤
다. 한 가지는 복잡도를 예측할 수 있는 문제이고, 다른 하나는 복잡도를 예측할 수 없는 문제
다.
10
장에서 클러스터링을 살펴볼 때 이 예제들을 다시 사용할 것이다.
다음으로,
multiprocessing
이 지원하는
Queue
기능과 그 부가비용을 살펴봤다. 일반적으로
는 외부 큐 라이브러리를 사용해서 큐의 상태를 더 투명하게 만들기를 권장한다. 가능하다면
피클된 데이터 대신 읽기 쉬운 형식을 사용해서 디버깅하기 쉽게 만들어야 한다.
또한,
IPC
도 다뤘다.
IPC
를 효율적으로 사용하기가 얼마나 어려운지와 (
IPC
를 사용하지 않
는) 단순한 병렬 해법을 사용하는 편이 합리적일 수 있음을 알았기 바란다. 더 많은 코어를 장
착한 더 빠른 컴퓨터를 사는 방법이 기존 컴퓨터를 최대한 활용하려고
IPC
를 시도하는 것보다
훨씬 실용적인 해법이다.
numpy
행렬의 복사본을 만들지 않고 병렬로 공유하는 방식은 일부 문제에서만 중요하다. 하지
만 그런 경우라면 공유하는 일은 정말로 중요하다. 프로세스 사이에 데이터를 복사하지 않고
공유 중인지를 확실히 하려면 코드를 몇 줄 더 쓰고 완전성을 검사해야 한다.
마지막으로, 파일과 메모리 락을 사용해서 데이터 오염을 방지하는 방법을 살펴봤다. 이는 심
각하고 추적하기 어려운 오류의 근원이다. 여기서는 튼튼하고 가벼운 해법 몇 가지를 보여
줬다.
다음 장에서는 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

이펙티브 타입스크립트

이펙티브 타입스크립트

Dan Vanderkam
견고한 데이터 엔지니어링

견고한 데이터 엔지니어링

조 라이스, 맷 하우슬리
핸즈온 비지도 학습

핸즈온 비지도 학습

강재원, 권재철, 안쿠르 A. 파텔

Publisher Resources

ISBN: 9791162244210