Haskell High Performance Programming (Paperback) – September 26, 2016

Samuli Thomasson

  • 出版商: Packt Publishing
  • 出版日期: 2016-09-26
  • 售價: $2,170
  • 貴賓價: 9.5$2,062
  • 語言: 英文
  • 頁數: 408
  • 裝訂: Paperback
  • ISBN: 1786464217
  • ISBN-13: 9781786464217
  • 相關分類: Functional-programming
  • 海外代購書籍(需單獨結帳)

相關主題

商品描述

Key Features

  • Explore the benefits of lazy evaluation, compiler features, and tools and libraries designed for high performance
  • Write fast programs at extremely high levels of abstraction
  • Work through practical examples that will help you address the challenges of writing efficient code

Book Description

Haskell, with its power to optimize the code and its high performance, is a natural candidate for high performance programming. It is especially well suited to stacking abstractions high with a relatively low performance cost. This book addresses the challenges of writing efficient code with lazy evaluation and techniques often used to optimize the performance of Haskell programs.

We open with an in-depth look at the evaluation of Haskell expressions and discuss optimization and benchmarking. You will learn to use parallelism and we'll explore the concept of streaming. We'll demonstrate the benefits of running multithreaded and concurrent applications. Next we'll guide you through various profiling tools that will help you identify performance issues in your program. We'll end our journey by looking at GPGPU, Cloud and Functional Reactive Programming in Haskell. At the very end there is a catalogue of robust library recommendations with code samples.

By the end of the book, you will be able to boost the performance of any app and prepare it to stand up to real-world punishment.

What you will learn

  • Program idiomatic Haskell that's also surprisingly efficient
  • Improve performance of your code with data parallelism, inlining, and strictness annotations
  • Profile your programs to identify space leaks and missed opportunities for optimization
  • Find out how to choose the most efficient data and control structures
  • Optimize the Glasgow Haskell Compiler and runtime system for specific programs
  • See how to smoothly drop to lower abstractions wherever necessary
  • Execute programming for the GPU with Accelerate
  • Implement programming to easily scale to the cloud with Cloud Haskell

About the Author

Samuli Thomasson is a long-time functional programming enthusiast from Finland who has used Haskell extensively, both as a pastime and commercially, for over four years. He enjoys working with great tools that help in getting things done nice and fast.

His current job at RELEX Solutions consists of providing technical solutions to a variety of practical problems. Besides functional programming, Samuli is interested in distributed systems, which he also studies at the University of Helsinki.

Table of Contents

  1. Identifying Bottlenecks
  2. Choosing the Correct Data Structures
  3. Profile and Benchmark to Your Heart's Content
  4. The Devil's in the Detail
  5. Parallelize for Performance
  6. I/O and Streaming
  7. Concurrency and Performance
  8. Tweaking the Compiler and Runtime System (GHC)
  9. GHC Internals and Code Generation
  10. Foreign Function Interface
  11. Programming for the GPU with Accelerate
  12. Scaling to the Cloud with Cloud Haskell
  13. Functional Reactive Programming
  14. Library Recommendations

商品描述(中文翻譯)

主要特點


  • 探索惰性評估、編譯器功能以及針對高性能設計的工具和庫的好處

  • 以極高的抽象層次撰寫快速程式

  • 通過實際示例解決撰寫高效代碼的挑戰

書籍描述

Haskell以其優化代碼和高性能的能力,是高性能編程的自然選擇。它特別適合在相對較低的性能成本下堆疊高抽象層次。本書解決了使用惰性評估和常用於優化Haskell程序性能的技術所面臨的挑戰。

我們首先深入研究Haskell表達式的評估,並討論優化和基準測試。您將學習使用並行處理,並探索流式概念。我們將展示多線程和並發應用程序的好處。接下來,我們將引導您使用各種性能分析工具,幫助您識別程序中的性能問題。我們將以GPGPU、雲端和Haskell中的函數反應編程結束我們的旅程。最後,提供了一個包含代碼示例的強大庫推薦目錄。

通過閱讀本書,您將能夠提升任何應用程序的性能,並使其能夠應對現實世界的考驗。

你將學到什麼


  • 以符合慣用的Haskell編程方式,同時實現出人意料的高效率

  • 通過數據並行處理、內聯和嚴格性註釋來提高代碼性能

  • 使用性能分析工具來識別空間洩漏和優化機會

  • 找出最高效的數據和控制結構

  • 針對特定程序優化Glasgow Haskell Compiler和運行時系統

  • 了解如何在必要時平滑過渡到較低的抽象層次

  • 使用Accelerate在GPU上執行編程

  • 使用Cloud Haskell輕鬆擴展到雲端

關於作者

Samuli Thomasson是芬蘭的一位長期函數式編程愛好者,他在過去四年中廣泛使用Haskell,無論是作為娛樂活動還是商業用途。他喜歡使用優秀的工具來快速解決問題。

他目前在RELEX Solutions擔任技術解決方案提供者,解決各種實際問題。除了函數式編程,Samuli還對分佈式系統感興趣,他也在赫爾辛基大學學習該領域。

目錄


  1. 識別瓶頸

  2. 選擇正確的數據結構

  3. 進行性能分析和基準測試

  4. 魔鬼在細節中

  5. 並行化以提高性能

  6. 輸入輸出和流式處理

  7. 並發和性能

  8. 調整編譯器和運行時系統(GHC)

  9. GHC內部和代碼生成

  10. 外部函數接口

  11. 使用Accelerate在GPU上編程

  12. 使用Cloud Haskell擴展到雲端

  13. 函數反應編程

  14. 庫推薦