更新时间:2021-07-14 09:59:48
封面
版权页
Credits
About the Author
About the Reviewer
www.PacktPub.com
eBooks discount offers and more
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Chapter 1. Identifying Bottlenecks
Meeting lazy evaluation
Memoization and CAFs
Recursion and accumulators
Inspecting time and space usage
Compiler code optimizations
Summary
Chapter 2. Choosing the Correct Data Structures
Annotating strictness and unpacking datatype fields
Handling numerical data
Handling binary and textual data
Handling sequential data
Handling tabular data
Handling sparse data
Ephemeral data structures
Working with monads and monad stacks
Chapter 3. Profile and Benchmark to Your Heart's Content
Profiling time and allocations
Heap profiling
Benchmarking using the criterion library
Profile and monitor in real time
Chapter 4. The Devil's in the Detail
The anatomy of a Haskell project
Erroring and handling exceptions
Writing tests for Haskell
Trivia at term-level
Trivia at type-level
Useful GHC extensions
Chapter 5. Parallelize for Performance
Primitive parallelism and the Runtime System
The Eval monad and strategies
The Par monad and schedules
Diagnosing parallelism – ThreadScope
Data parallel programming – Repa
Chapter 6. I/O and Streaming
Reading writing and handling resources
Streaming with side-effects
Logging in Haskell
Chapter 7. Concurrency and Performance
Threads and concurrency primitives
Software Transactional Memory
Runtime System and threads
Asynchronous processing
Lifting up from I/O
Chapter 8. Tweaking the Compiler and Runtime System (GHC)
Using GHC like a pro
Tuning GHC's Runtime System
Summary of useful GHC options
Summary of useful RTS options
Chapter 9. GHC Internals and Code Generation
Interpreting GHC's internal representations
Primitive GHC-specific features
Datatype generic programming
Generating Haskell with Haskell
Chapter 10. Foreign Function Interface
From Haskell to C and C to Haskell
Data marshal and stable pointers
Chapter 11. Programming for the GPU with Accelerate
Writing Accelerate programs
Running with the CUDA backend
More Accelerate concepts
Chapter 12. Scaling to the Cloud with Cloud Haskell
Processes and message-passing
Handling failure
Nodes and networking
Chapter 13. Functional Reactive Programming
The tiny discrete-time Elerea
Events and signal functions with Yampa
Reactive-banana – Safe and simple semantics
Combining events and behaviors
Chapter 14. Library Recommendations
Representing data
Functional graphs
Numeric data for special use