PacktLib: Clojure High Performance Programming

Clojure High Performance Programming

Credits

About the Author

Acknowledgments

About the Reviewers

www.PacktPub.com

Preface

Performance by Design

Use case classification

Performance vocabulary

Latency numbers every programmer should know

Summary

Clojure Abstractions

Non-numeric scalars and interning

Identity, value, and epochal time model

Persistent data structures

Sequences and laziness

Transients

Performance miscellanea

Summary

Leaning on Java

Inspect the equivalent Java source for Clojure code

Numerics, boxing, and primitives

Arrays

Reflection and type hints

Using array/numeric libraries for efficiency

Resorting to Java and native code

Summary

Host Performance

The hardware

The Java Virtual Machine

Measuring latency with Criterium

Summary

Concurrency

Low-level concurrency

Atomic updates and state

Asynchronous agents and state

Coordinated transactional ref and state

Dynamic var binding and state

Validating and watching the reference types

Java concurrent data structures

Concurrency with threads


Clojure parallelization and the JVM

Parallelism with reducers

Summary

Optimizing Performance

A tiny statistics terminology primer

Performance testing

Performance monitoring

Profiling

Performance tuning

Summary

Application Performance

Data sizing

Resource pooling

I/O batching and throttling

Precomputing and caching

Concurrent pipelines

Applying back pressure

Performance and queuing theory

Summary

Index