售 价:¥
温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印
为你推荐
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
The Julia API
Calling API from C
Metaprogramming
Symbols
Macros
Testing
Error handling
The enum macro
Tasks
Parallel operations
Distributed arrays
A simple MapReduce
Executing commands
Running commands
Working with the filesystem
Redirection and pipes
Perl one-liners
Summary
5. Working with Data
Basic I/O
Terminal I/O
Disk files
Text processing
Binary files
Structured datasets
CSV and DLM files
HDF5
XML files
DataFrames and RDatasets
The DataFrames package
DataFrames
RDatasets
Subsetting, sorting, and joining data
Statistics
Simple statistics
Samples and estimations
Pandas
Selected topics
Time series
Distributions
Kernel density
Hypothesis testing
GLM
Summary
6. Scientific Programming
Linear algebra
Simultaneous equations
Decompositions
Eigenvalues and eigenvectors
Special matrices
A symmetric eigenproblem
Signal processing
Frequency analysis
Filtering and smoothing
Digital signal filters
Image processing
Differential equations
The solution of ordinary differential equations
Non-linear ordinary differential equations
Partial differential equations
Optimization problems
JuMP
Optim
NLopt
Using with the MathProgBase interface
Stochastic problems
Stochastic simulations
SimJulia
Bank teller example
Bayesian methods and Markov processes
Monte Carlo Markov Chains
MCMC frameworks
Summary
7. Graphics
Basic graphics in Julia
Text plotting
Cairo
Winston
Data visualization
Gadfly
Compose
Graphic engines
PyPlot
Gaston
PGF plots
Using the Web
Bokeh
Plotly
Raster graphics
Cairo (revisited)
Winston (revisited)
Images and ImageView
Summary
8. Databases
A basic view of databases
The red pill or the blue pill?
Interfacing to databases
Other considerations
Relational databases
Building and loading
Native interfaces
ODBC
Other interfacing techniques
DBI
SQLite
MySQL
PostgreSQL
PyCall
JDBC
NoSQL datastores
Key-value systems
Document datastores
RESTful interfacing
JSON
Web-based databases
Graphic systems
Summary
9. Networking
Sockets and servers
Well-known ports
UDP and TCP sockets in Julia
A "Looking-Glass World" echo server
Named pipes
Working with the Web
A TCP web service
The JuliaWeb group
The "quotes" server
WebSockets
Messaging
SMS and esendex
Cloud services
Introducing Amazon Web Services
The AWS.jl package
The Google Cloud
Summary
10. Working with Julia
Under the hood
Femtolisp
The Julia API
Code generation
Performance tips
Best practice
Profiling
Lint
Debugging
Developing a package
Anatomy
Taxonomy
Using Git
Publishing
Community groups
Classifications
JuliaAstro
Cosmology models
The Flexible Image Transport System
The high-level API
The low-level API
JuliaGPU
What's missing?
Summary
A. Bibliography
Index
买过这本书的人还买过
读了这本书的人还在读
同类图书排行榜