万本电子书0元读

万本电子书0元读

顶部广告

Julia: High Performance Programming电子书

售       价:¥

6人正在读 | 0人评论 9.8

作       者:Ivo Balbaert

出  版  社:Packt Publishing

出版时间:2016-11-01

字       数:619.6万

所属分类: 进口书 > 外文原版书 > 电脑/网络

温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印

为你推荐

  • 读书简介
  • 目录
  • 累计评论(0条)
  • 读书简介
  • 目录
  • 累计评论(0条)
Leverage the power of Julia to design and develop high performing programs About This Book Get to know the best techniques to create blazingly fast programs with Julia Stand out from the crowd by developing code that runs faster than your peers' code Complete an extensive data science project through the entire cycle from ETL to analytics and data visualization Who This Book Is For This learning path is for data scientists and for all those who work in technical and scientific computation projects. It will be great for Julia developers who are interested in high-performance technical computing. This learning path assumes that you already have some basic working knowledge of Julia's syntax and high-level dynamic languages such as MATLAB, R, Python, or Ruby. What You Will Learn Set up your Julia environment to achieve the highest productivity Solve your tasks in a high-level dynamic language and use types for your data only when needed Apply Julia to tackle problems concurrently and in a distributed environment Get a sense of the possibilities and limitations of Julia's performance Use Julia arrays to write high performance code Build a data science project through the entire cycle of ETL, analytics, and data visualization Display graphics and visualizations to carry out modeling and simulation in Julia Develop your own packages and contribute to the Julia Community In Detail In this learning path, you will learn to use an interesting and dynamic programming language—Julia! You will get a chance to tackle your numerical and data problems with Julia. You’ll begin the journey by setting up a running Julia platform before exploring its various built-in types. We’ll then move on to the various functions and constructs in Julia. We’ll walk through the two important collection types—arrays and matrices in Julia. You will dive into how Julia uses type information to achieve its performance goals, and how to use multiple dispatch to help the compiler emit high performance machine code. You will see how Julia’s design makes code fast, and you’ll see its distributed computing capabilities. By the end of this learning path, you will see how data works using simple statistics and analytics, and you’ll discover its high and dynamic performance—its real strength, which makes it particularly useful in highly intensive computing tasks. This learning path combines some of the best that Packt has to offer in one complete, curated package. It includes content from the following Packt products: Getting Started with Julia by Ivo Balvaert Julia High Performance by Avik Sengupta Mastering Julia by Malcolm Sherrington Style and approach This hands-on manual will give you great explanations of the important concepts related to Julia programming.
目录展开

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

E-mail

Twitter

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

累计评论(0条) 0个书友正在讨论这本书 发表评论

发表评论

发表评论,分享你的想法吧!

买过这本书的人还买过

读了这本书的人还在读

回顶部