Clojure High Performance Programming (2nd Edition) by Shantanu Kumar

By Shantanu Kumar

Become a professional at writing speedy and excessive performant code in Clojure 1.7.0

About This Book
• improve code functionality by utilizing applicable Clojure features
• increase the potency of purposes and plan their deployment
• A hands-on consultant to designing Clojure courses to get the simplest performance

Who This booklet Is For
This ebook is meant for intermediate Clojure builders who're seeking to get an outstanding grip on attaining optimal functionality. Having a uncomplicated wisdom of Java will be helpful.

What you'll Learn
• determine functionality concerns in Clojure courses utilizing various profiling tools
• grasp concepts to accomplish numerical functionality in Clojure
• Use Criterium library to degree latency of Clojure expressions
• take advantage of Java positive aspects in Clojure code to reinforce performance
• keep away from mirrored image and boxing with sort hints
• comprehend Clojure's concurrency and state-management primitives in depth
• degree and display screen functionality, and comprehend optimization techniques

In Detail
Clojure treats code as facts and has a macro procedure. It makes a speciality of programming with immutable values and particular progression-of-time constructs, that are meant to facilitate the advance of extra powerful courses, fairly multithreaded ones. it truly is equipped with functionality, pragmatism, and straightforwardness in brain. Like so much normal goal languages, a variety of Clojure positive aspects have diversified functionality features that one may still comprehend for you to write excessive functionality code.

This publication exhibits you ways to judge the functionality implications of varied Clojure abstractions, realize their underpinnings, and follow the fitting procedure for max functionality in real-world programs.

It starts off via assisting you classify numerous use situations and the necessity for them with appreciate to functionality and research of varied functionality points. additionally, you will study the functionality vocabulary that specialists use through the global and observe a variety of Clojure facts buildings, abstractions, and their functionality features. extra, the e-book will advisor you thru improving functionality by utilizing Java interoperability and JVM-specific beneficial properties from Clojure. It additionally highlights the significance of utilizing the appropriate concurrent information constitution and Java concurrency abstractions.

This e-book additionally sheds mild on functionality metrics for measuring, how one can degree, and the way to imagine and computer screen the amassed facts. on the finish of the e-book, you'll learn how to run a functionality profiler, establish bottlenecks, music functionality, and refactor code to get a greater performance.

Style and approach
An easy-to-follow consultant filled with real-world examples and self-sufficient code snippets to help you get your palms soiled with excessive functionality programming with Clojure.

Show description

Read or Download Clojure High Performance Programming (2nd Edition) PDF

Similar programming books

Learn Ruby The Hard Way (Zed Shaw's Hard Way Series)

Do you actually need to profit programming yet haven't any ability? Are you a method administrator who desires to study Puppet or Chef? Are you a fashion designer who desires to construct your personal web pages? Are you a Ruby on Rails programmer who's ashamed that you just don't quite be aware of Ruby? then you definitely may still learn this booklet.

Backbone.js Blueprints

Spine. js is an open resource, JavaScript library that permits you to construct subtle and established net apps. It's vital to have well-organized frontend code for simple upkeep and extendability. With the spine framework, you'll manage to construct functions which are a breeze to regulate.

Hadoop for Dummies

Enable "Hadoop For Dummies" aid harness the facility of your info and rein within the info overloadBig information has turn into substantial enterprise, and corporations and businesses of all sizes are suffering to discover how one can retrieve important info from their big info units with changing into beaten.

Extra resources for Clojure High Performance Programming (2nd Edition)

Example text

This chapter discusses those aspects of Clojure. In this chapter we will discuss: • Inspecting Java and bytecode generated from a Clojure source • Numerics and primitives • Working with arrays • Reflection and type hinting Inspecting the equivalent Java source for Clojure code Inspecting the equivalent Java source for a given Clojure code provides great insight into how that might impact its performance. However, Clojure generates only Java bytecodes at runtime unless we compile a namespace out to the disk.

Jar Note that this usage will not automatically avoid assertions in the dependency libraries. Destructuring Destructuring is one of Clojure's built-in mini languages and, arguably, a top productivity booster during development. This feature leads to the parsing of values to match the left-hand side of the binding forms. The more complicated the binding form, the more work there is that needs to be done. Not surprisingly, this has a little bit of performance overhead. It is easy to avoid this overhead by using explicit functions to unravel data in the tight loops and other performance-critical code.

Since the core functions have been overhauled to work with transducers, it makes sense to model transformations more often than not in terms of transducers. [ 27 ] Clojure Abstractions Transients Earlier in this chapter, we discussed the virtues of immutability and the pitfalls of mutability. However, even though mutability is fundamentally unsafe, it also has very good single-threaded performance. Now, what if there was a way to restrict the mutable operation in a local context in order to provide safety guarantees?

Download PDF sample

Rated 4.33 of 5 – based on 34 votes