ebook img

Julia: High Performance Programming. Learning path PDF

816 Pages·2016·6.693 MB·English
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview Julia: High Performance Programming. Learning path

Julia: High Performance Programming Table of Contents Julia: High Performance Programming Julia: High Performance Programming Credits Preface What this learning path covers What you need for this learning path Who this learning path is for Reader feedback Customer support Downloading the example code Errata Piracy Questions I. Module 1 The Rationale for Julia The scope of Julia Julia's place among the other programming languages A comparison with other languages for the data scientist MATLAB R Python Useful links Summary 1. Installing the Julia Platform Installing Julia Windows version – usable from Windows XP SP2 onwards Ubuntu version OS X Building from source Working with Julia's shell Startup options and Julia scripts Packages Adding a new package Installing and working with Julia Studio Installing and working with IJulia Installing Sublime-IJulia Installing Juno Other editors and IDEs How Julia works Summary 2. Variables, Types, and Operations Variables, naming conventions, and comments Types Integers Floating point numbers Elementary mathematical functions and operations Rational and complex numbers Characters Strings Formatting numbers and strings Regular expressions Ranges and arrays Other ways to create arrays Some common functions for arrays How to convert an array of chars to a string Dates and times Scope and constants Summary 3. Functions Defining functions Optional and keyword arguments Anonymous functions First-class functions and closures Recursive functions Map, filter, and list comprehensions Generic functions and multiple dispatch Summary 4. Control Flow Conditional evaluation Repeated evaluation The for loop The while loop The break statement The continue statement Exception handling Scope revisited Tasks Summary 5. Collection Types Matrices Tuples Dictionaries Keys and values – looping Sets Making a set of tuples Example project – word frequency Summary 6. More on Types, Methods, and Modules Type annotations and conversions Type conversions and promotions The type hierarchy – subtypes and supertypes Concrete and abstract types User-defined and composite types When are two values or objects equal or identical? Multiple dispatch example Types and collections – inner constructors Type unions Parametric types and methods Standard modules and paths Summary 7. Metaprogramming in Julia Expressions and symbols Eval and interpolation Defining macros Built-in macros Testing Debugging Benchmarking Starting a task Reflection capabilities Summary 8. I/O, Networking, and Parallel Computing Basic input and output Working with files Reading and writing CSV files Using DataFrames Other file formats Working with TCP sockets and servers Interacting with databases Parallel operations and computing Creating processes Using low-level communications Parallel loops and maps Distributed arrays Summary 9. Running External Programs Running shell commands Interpolation Pipelining Calling C and FORTRAN Calling Python Performance tips Tools to use Summary 10. The Standard Library and Packages Digging deeper into the standard library Julia's package manager Installing and updating packages Publishing a package Graphics in Julia Using Gadfly on data Summary A. List of Macros and Packages Macros List of packages II. Module 2 1. Julia is Fast Julia – fast and dynamic Designed for speed JIT and LLVM Types How fast can Julia be? Summary 2. Analyzing Julia Performance Timing Julia code Tic and Toc The @time macro The @timev macro The Julia profiler Using the profiler ProfileView Analyzing memory allocation Using the memory allocation tracker Statistically accurate benchmarking Using Benchmarks.jl Summary 3. Types in Julia The Julia type system Using types Multiple dispatch Abstract types Julia's type hierarchy Composite and immutable types Type parameters Type inference Type-stability Definitions Fixing type-instability Performance pitfalls Identifying type-stability Loop variables Kernel methods Types in storage locations Arrays Composite types Parametric composite types Summary 4. Functions and Macros – Structuring Julia Code for High Performance Using globals The trouble with globals Fixing performance issues with globals Inlining Default inlining Controlling inlining Disabling inlining Closures and anonymous functions FastAnonymous Using macros for performance The Julia compilation process Using macros Evaluating a polynomial Horner's method The Horner macro Generated functions Using generated functions Using generated functions for performance Using named parameters Summary 5. Fast Numbers Numbers in Julia Integers Integer overflow BigInt The floating point Unchecked conversions for unsigned integers Trading performance for accuracy The fastmath macro The K-B-N summation Subnormal numbers Subnormal numbers to zero Summary 6. Fast Arrays Array internals in Julia Array representation and storage Column-wise storage Bound checking Removing the cost of bound checking Configuring bound checks at startup Allocations and in-place operations Preallocating function output Mutating versions Array views SIMD parallelization Yeppp! Writing generic library functions with arrays Summary 7. Beyond the Single Processor Parallelism in Julia Starting a cluster Communication between Julia processes Programming parallel tasks @everywhere @spawn Parallel for Parallel map Distributed arrays Shared arrays Threading Summary III. Module 3 1. The Julia Environment Introduction Philosophy Role in data science and big data Comparison with other languages Features Getting started Julia sources Exploring the source stack Juno IJulia A quick look at some Julia Julia via the console Installing some packages A bit of graphics creating more realistic graphics with Winston My benchmarks Package management Listing, adding, and removing Choosing and exploring packages Statistics and mathematics Data visualization Web and networking Database and specialist packages How to uninstall Julia Adding an unregistered package What makes Julia special Parallel processing Multiple dispatch Homoiconic macros Interlanguage cooperation Summary 2. Developing in Julia Integers, bits, bytes, and bools Integers Logical and arithmetic operators Booleans Arrays Operations on matrices Elemental operations A simple Markov chain – cat and mouse Char and strings Characters Strings Unicode support Regular expressions Byte array literals Version literals An example Real, complex, and rational numbers Reals Operators and built-in functions Special values BigFloats Rationals Complex numbers Juliasets Composite types More about matrices Vectorized and devectorized code Multidimensional arrays Broadcasting Sparse matrices Data arrays and data frames Dictionaries, sets, and others Dictionaries Sets Other data structures Summary 3. Types and Dispatch Functions First-class objects Passing arguments Default and optional arguments Variable argument list Named parameters Scope The Queen's problem Julia's type system A look at the rational type A vehicle datatype Typealias and unions Enumerations (revisited) Multiple dispatch Parametric types Conversion and promotion Conversion Promotion A fixed vector module Summary 4. Interoperability Interfacing with other programming environments Calling C and Fortran Mapping C types Array conversions Type correspondences Calling a Fortran routine Calling curl to retrieve a web page Python Some others to watch

See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.