Concurrency vs parallelism
They sound identical in Japanese (並行 / 並列) but name different things. Concurrency is about structure — dealing with many tasks in overlapping time by switching between them. Parallelism is about execution — actually running multiple tasks at the same instant, which needs multiple workers (CPU cores). Rob Pike's line: 'Concurrency is about dealing with lots of things at once; parallelism is about doing lots of things at once.'
Concurrency = structure
- Concurrency = designing a program so many tasks make progress in overlapping periods, not necessarily at the same instant.
- One worker can be concurrent: it starts task A, switches to task B while A waits, comes back to A — interleaving.
- Possible on a single CPU core via time-slicing (rapidly switching). No second worker required.
- It's about how you organise independent tasks, not about raw speed.
Parallelism = simultaneous execution
- Parallelism = literally executing multiple tasks at the very same instant.
- Requires multiple execution units — 2+ CPU cores, or multiple machines.
- This is what actually makes wall-clock time shorter for CPU-heavy work.
- Parallelism is one way to run a concurrent design fast; concurrency is the design that makes parallelism usable.
The café analogy (as a footnote)
- Concurrency: one barista takes an order, starts the machine, takes the next order while coffee brews — juggling, one person.
- Parallelism: two baristas each making a drink at the same moment — genuinely simultaneous.
- So concurrency can exist without parallelism (1 barista juggling), and parallelism needs ≥2 workers.
- In Claude Code workflows: parallel() queues many agents concurrently, but true parallelism is capped at (CPU cores − 2) — the rest wait their turn.
並行と並列のちがい
日本語では似て見えるが(並行=concurrency/並列=parallelism)、指すものが違う。並行は「構造」の話——多数のタスクを、時間を重ねながら切り替えて進める設計。並列は「実行」の話——複数のタスクを本当に同時に走らせることで、複数の働き手(CPUコア)が要る。Rob Pike(=Go言語の設計者の一人)の言葉:「並行とは多くを“さばく”こと、並列とは多くを“同時に行う”こと」。
並行(concurrency)=構造
- 並行=多数のタスクが、重なり合う時間の中で進むよう設計すること。必ずしも同一瞬間ではない。
- 働き手が1人でも並行はできる:タスクAを始め、Aが待ちの間にBへ切り替え、またAへ戻る——交互処理(インターリーブ)。
- CPUコアが1つでも、タイムスライス(=ごく短時間で切り替える方式)で実現できる。2人目の働き手は不要。
- 「独立したタスクをどう組み立てるか」の話で、速度そのものの話ではない。
並列(parallelism)=同時実行
- 並列=複数のタスクを、文字どおり同一瞬間に実行すること。
- 複数の実行単位が必要——CPUコアが2つ以上、または複数台のマシン。
- CPUを多く使う処理で、実時間(=時計で測った時間)を実際に短くするのはこれ。
- 並列は「並行設計を速く走らせる一手段」。並行という設計があってこそ、並列が活きる。
カフェのたとえ(補足として)
- 並行:1人のバリスタが注文を受け、マシンを回し、抽出を待つ間に次の注文を受ける——1人でやりくり。
- 並列:2人のバリスタが同じ瞬間にそれぞれ1杯ずつ作る——本当に同時。
- だから並行は並列なしでも成立し(1人のやりくり)、並列は働き手2人以上が要る。
- Claude Codeのワークフローでは:parallel() は多数のエージェントを並行に列に並べるが、真の並列は(CPUコア数−2)が上限で、残りは順番待ちになる。
Concurrency vs parallelism
They sound identical in Japanese (並行 / 並列) but name different things. Concurrency is about structure — dealing with many tasks in overlapping time by switching between them. Parallelism is about execution — actually running multiple tasks at the same instant, which needs multiple workers (CPU cores). Rob Pike's line: 'Concurrency is about dealing with lots of things at once; parallelism is about doing lots of things at once.'
Concurrency = structure
- Concurrency = designing a program so many tasks make progress in overlapping periods, not necessarily at the same instant.
- One worker can be concurrent: it starts task A, switches to task B while A waits, comes back to A — interleaving.
- Possible on a single CPU core via time-slicing (rapidly switching). No second worker required.
- It's about how you organise independent tasks, not about raw speed.
Parallelism = simultaneous execution
- Parallelism = literally executing multiple tasks at the very same instant.
- Requires multiple execution units — 2+ CPU cores, or multiple machines.
- This is what actually makes wall-clock time shorter for CPU-heavy work.
- Parallelism is one way to run a concurrent design fast; concurrency is the design that makes parallelism usable.
The café analogy (as a footnote)
- Concurrency: one barista takes an order, starts the machine, takes the next order while coffee brews — juggling, one person.
- Parallelism: two baristas each making a drink at the same moment — genuinely simultaneous.
- So concurrency can exist without parallelism (1 barista juggling), and parallelism needs ≥2 workers.
- In Claude Code workflows: parallel() queues many agents concurrently, but true parallelism is capped at (CPU cores − 2) — the rest wait their turn.
並行と並列のちがい
日本語では似て見えるが(並行=concurrency/並列=parallelism)、指すものが違う。並行は「構造」の話——多数のタスクを、時間を重ねながら切り替えて進める設計。並列は「実行」の話——複数のタスクを本当に同時に走らせることで、複数の働き手(CPUコア)が要る。Rob Pike(=Go言語の設計者の一人)の言葉:「並行とは多くを“さばく”こと、並列とは多くを“同時に行う”こと」。
並行(concurrency)=構造
- 並行=多数のタスクが、重なり合う時間の中で進むよう設計すること。必ずしも同一瞬間ではない。
- 働き手が1人でも並行はできる:タスクAを始め、Aが待ちの間にBへ切り替え、またAへ戻る——交互処理(インターリーブ)。
- CPUコアが1つでも、タイムスライス(=ごく短時間で切り替える方式)で実現できる。2人目の働き手は不要。
- 「独立したタスクをどう組み立てるか」の話で、速度そのものの話ではない。
並列(parallelism)=同時実行
- 並列=複数のタスクを、文字どおり同一瞬間に実行すること。
- 複数の実行単位が必要——CPUコアが2つ以上、または複数台のマシン。
- CPUを多く使う処理で、実時間(=時計で測った時間)を実際に短くするのはこれ。
- 並列は「並行設計を速く走らせる一手段」。並行という設計があってこそ、並列が活きる。
カフェのたとえ(補足として)
- 並行:1人のバリスタが注文を受け、マシンを回し、抽出を待つ間に次の注文を受ける——1人でやりくり。
- 並列:2人のバリスタが同じ瞬間にそれぞれ1杯ずつ作る——本当に同時。
- だから並行は並列なしでも成立し(1人のやりくり)、並列は働き手2人以上が要る。
- Claude Codeのワークフローでは:parallel() は多数のエージェントを並行に列に並べるが、真の並列は(CPUコア数−2)が上限で、残りは順番待ちになる。
Related notes
- Agentic Commerce — ACP and Visibility into Being 'Bought by AI'
- AI Search Evaluation: The 12 Metrics — Gateway
- AI Search Evaluation ①Citation Rate — How Many URLs Are Pulled In Per Answer
- AI Search Evaluation ②Source Diversity — How Unskewed the Cited Sources Are
- AI Search Evaluation ③Accuracy Score — How Often It Answers Factual Questions Correctly
- AI Search Evaluation ④Answer Length — How Many Characters It Returns to the User on Average