Skip to Content
ハイパフォーマンスPython
book

ハイパフォーマンスPython

by Micha Gorelick, Ian Ozsvald, 相川 愛三
November 2015
Intermediate to advanced
360 pages
6h 16m
Japanese
O'Reilly Japan, Inc.
Content preview from ハイパフォーマンスPython

1章高性能なPythonを理解する

本章を読めば以下の問いに答えられるようになる
  • コンピュータアーキテクチャの構成要素とは何か?
  • 一般に、構成要素にはどんなものがあるか?
  • Pythonは下層のコンピュータアーキテクチャをどのように抽象化しているのか?
  • Pythonのコードを最適化するうえでの障壁は何か?
  • 性能問題にはどんなものがあるか?

コンピュータのプログラムの働きは、ある特定の結果を導き出すために、データのビットを移動して特別な方法で変換すること、とみなすことができます。これには時間というコストがかかります。高性能化プログラミングとは、(より効率のよいコードを書くなどして)オーバーヘッドを減らしたり、(より適切なアルゴリズムを適用して)ひとつひとつの処理がより有意義になるように処理のやり方を変えたりすることによって、処理を最小化することとみなすことができます。

ビットを移動している実ハードウェアについての洞察力を高めるために、コードのオーバーヘッドを軽減することに焦点を当ててみましょう。Pythonはハードウェアを直接操作するのではなく抽象化することに重きを置く言語なので、ビット移動のレベルで考えるのは困難に思えるかもしれません。しかし、実ハードウェア上でビットを移動する最良の方法と、Pythonがビットの移動を抽象化する方法の両方を理解すれば、Pythonで高性能なプログラムを組むのに一歩前進することができます。

1.1 コンピュータシステムの基礎

簡単に言えば、コンピュータは「演算装置」「記憶装置」「両者の接続装置」の3つの基本パーツから構成されています。さらに、これらのパーツにはそれぞれ使用上理解しておくべき特性があります。すなわち、演算装置には1秒間に何回の計算ができるのかという特性があり、記憶装置にはどれだけの量のデータを保持し、どれだけ速く読み書きできるのかという特性があり、接続装置にはどれだけ速くデータをある場所から別の場所に移動できるのかという特性があります。 ...

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

ハイパフォーマンスPython 第2版

ハイパフォーマンスPython 第2版

Micha Gorelick, Ian Ozsvald, 中山 光樹
Python機械学習クックブック

Python機械学習クックブック

Chris Albon, 中田 秀基
オブザーバビリティ・エンジニアリング

オブザーバビリティ・エンジニアリング

Charity Majors, Liz Fong-Jones, George Miranda, 大谷 和紀, 山口 能迪
パフォーマンス向上のためのデザイン設計

パフォーマンス向上のためのデザイン設計

Lara Callender Hogan, 西脇 靖紘, 星野 靖子

Publisher Resources

ISBN: 9784873117409Other