タグ

Pythonとcythonに関するdarwiniaのブックマーク (4)

  • ハイパフォーマンスPython

    TOPICS Programming , Python 発行年月日 2015年11月 PRINT LENGTH 360 ISBN 978-4-87311-740-9 原書 High Performance Python FORMAT Pythonの高速化技法について一歩踏み込んだプロユースの解説書。ボトルネックの測定方法から、最適なデータ構造の使い分け、CythonやPyPyなどのコンパイラの比較、numpyなどのパッケージの使い方、マルチコアCPUの活用法、メモリ効率を劇的に改善するトライ構造や近似計算まで、シンプルな実例プログラムを用いながらわかりやすく説明します。高性能なプログラムの書き方だけでなく、高性能なシステムの作り方を総合的に学ぶことができるPythonエキスパート必携の一冊です。 翻訳者の相川氏のブログには、書の追加情報や関連する技術情報が掲載されています。 訳者まえがき

    ハイパフォーマンスPython
  • Cython

    強力なライブラリを豊富に備え、科学計算から統計分析、金融工学まで利用が広がるPython。スクリプト言語とは思えない高速性の秘密が、NumPyやSciPyなどのPythonパッケージで広く使われているCythonです。CythonはPythonプログラムの実装を高速化するコンパイラであると同時に、C/C++で書かれたライブラリをPythonから利用できるようにするブリッジとしての役割も果たします。書はPythonの表現力とC/C++の速さを備えたCythonを使って、高速なシステムを効率的に開発する手法を示します。科学技術計算や統計分析の分野では恒常的にある「Pythonを高速化したい」というニーズに応える一冊です。 はじめに 1章 Cythonの基 1.1 Python、C、Cythonの比較 1.1.1 関数呼び出しのオーバーヘッド 1.1.2 ループ処理 1.1.3 算術演算 1

    Cython
    darwinia
    darwinia 2015/06/04
    Cython本
  • Writing C in Cython

    For the last two years, I’ve done almost all of my work in Cython. And I don’t mean, I write Python, and then “Cythonize” it, with various type-declarations etc. I just, write Cython. I use “raw” C structs and arrays, and occasionally C++ vectors, with a thin wrapper around malloc/free that I wrote myself. The code is almost always exactly as fast as C/C++, because it really is just C/C++ with som

    Writing C in Cython
  • Cython versus CFFI / fuzzy notepad

    (This article has been translated into Russian by Everycloudtech—thanks!) I have a hilariously unfinished Python module I work on from time to time named sanpera. It’s an imaging library for Python, with the vain hope that it might replace PIL someday. But this isn’t about sanpera. sanpera happens to be powered by ImageMagick. I distinguish this from being an “ImageMagick wrapper”, as it explicitl

    Cython versus CFFI / fuzzy notepad
  • 1