High Performance Python 2nd Edition Micha Gorelick
1.
High Performance Python2nd Edition Micha
Gorelick install download
https://ebookmeta.com/product/high-performance-python-2nd-
edition-micha-gorelick/
Download more ebook from https://ebookmeta.com
2.
We believe theseproducts will be a great fit for you. Click
the link to download now, or visit ebookmeta.com
to discover even more!
Python High Performance Programming 1st Edition
Gabriele Lanaro
https://ebookmeta.com/product/python-high-performance-
programming-1st-edition-gabriele-lanaro/
High-Performance Training for Sports, 2nd Edition Joyce
https://ebookmeta.com/product/high-performance-training-for-
sports-2nd-edition-joyce/
High-Performance Web Apps with FastAPI: The
Asynchronous Web Framework Based on Modern Python 1st
Edition Malhar Lathkar
https://ebookmeta.com/product/high-performance-web-apps-with-
fastapi-the-asynchronous-web-framework-based-on-modern-
python-1st-edition-malhar-lathkar/
Manual for Eye Examination and Diagnosis 10th Edition
Leitman Mark W
https://ebookmeta.com/product/manual-for-eye-examination-and-
diagnosis-10th-edition-leitman-mark-w/
3.
McGraw Hill EducationTABE Level D 2nd Edition Phyllis
Dutwin
https://ebookmeta.com/product/mcgraw-hill-education-tabe-
level-d-2nd-edition-phyllis-dutwin/
Communication & Human Behavior 7th Edition Brent D
Ruben
https://ebookmeta.com/product/communication-human-behavior-7th-
edition-brent-d-ruben/
Assault on the Gothic Line 1944: The Allied Attempted
Breakthrough into Northern Italy Pier Paolo Battistelli
https://ebookmeta.com/product/assault-on-the-gothic-
line-1944-the-allied-attempted-breakthrough-into-northern-italy-
pier-paolo-battistelli/
Global Mental Health Ethics Allen R. Dyer (Editor)
https://ebookmeta.com/product/global-mental-health-ethics-allen-
r-dyer-editor/
Religion and State in Iran 1785 1906 The Role of the
Ulama in the Qajar Period Hamid Algar
https://ebookmeta.com/product/religion-and-state-in-
iran-1785-1906-the-role-of-the-ulama-in-the-qajar-period-hamid-
algar/
4.
Mr. Hot BossTo Go: A Forbidden Romance 1st Edition
S.C. Adams & S.E. Law
https://ebookmeta.com/product/mr-hot-boss-to-go-a-forbidden-
romance-1st-edition-s-c-adams-s-e-law/
6.
1. Foreword
2. Preface
a.Who This Book Is For
b. Who This Book Is Not For
c. What You’ll Learn
d. Python 3
e. Changes from Python 2.7
f. License
g. How to Make an Attribution
h. Errata and Feedback
i. Conventions Used in This Book
j. Using Code Examples
k. O’Reilly Online Learning
l. How to Contact Us
m. Acknowledgments
3. 1. Understanding Performant Python
a. The Fundamental Computer System
i. Computing Units
ii. Memory Units
iii. Communications Layers
b. Putting the Fundamental Elements Together
7.
i. Idealized ComputingVersus the Python
Virtual Machine
c. So Why Use Python?
d. How to Be a Highly Performant Programmer
i. Good Working Practices
ii. Some Thoughts on Good Notebook
Practice
iii. Getting the Joy Back into Your Work
4. 2. Profiling to Find Bottlenecks
a. Profiling Efficiently
b. Introducing the Julia Set
c. Calculating the Full Julia Set
d. Simple Approaches to Timing—print and a
Decorator
e. Simple Timing Using the Unix time Command
f. Using the cProfile Module
g. Visualizing cProfile Output with SnakeViz
h. Using line_profiler for Line-by-Line
Measurements
i. Using memory_profiler to Diagnose Memory
Usage
j. Introspecting an Existing Process with PySpy
k. Bytecode: Under the Hood
8.
i. Using thedis Module to Examine
CPython Bytecode
ii. Different Approaches, Different
Complexity
l. Unit Testing During Optimization to Maintain
Correctness
i. No-op @profile Decorator
m. Strategies to Profile Your Code Successfully
n. Wrap-Up
5. 3. Lists and Tuples
a. A More Efficient Search
b. Lists Versus Tuples
i. Lists as Dynamic Arrays
ii. Tuples as Static Arrays
c. Wrap-Up
6. 4. Dictionaries and Sets
a. How Do Dictionaries and Sets Work?
i. Inserting and Retrieving
ii. Deletion
iii. Resizing
iv. Hash Functions and Entropy
b. Dictionaries and Namespaces
c. Wrap-Up
9.
7. 5. Iteratorsand Generators
a. Iterators for Infinite Series
b. Lazy Generator Evaluation
c. Wrap-Up
8. 6. Matrix and Vector Computation
a. Introduction to the Problem
b. Aren’t Python Lists Good Enough?
i. Problems with Allocating Too Much
c. Memory Fragmentation
i. Understanding perf
ii. Making Decisions with perf’s Output
iii. Enter numpy
d. Applying numpy to the Diffusion Problem
i. Memory Allocations and In-Place
Operations
ii. Selective Optimizations: Finding What
Needs to Be Fixed
e. numexpr: Making In-Place Operations Faster
and Easier
f. A Cautionary Tale: Verify “Optimizations”
(scipy)
g. Lessons from Matrix Optimizations
h. Pandas
10.
i. Pandas’s InternalModel
ii. Applying a Function to Many Rows of
Data
iii. Building DataFrames and Series from
Partial Results Rather than
Concatenating
iv. There’s More Than One (and Possibly a
Faster) Way to Do a Job
v. Advice for Effective Pandas
Development
i. Wrap-Up
9. 7. Compiling to C
a. What Sort of Speed Gains Are Possible?
b. JIT Versus AOT Compilers
c. Why Does Type Information Help the Code
Run Faster?
d. Using a C Compiler
e. Reviewing the Julia Set Example
f. Cython
i. Compiling a Pure Python Version
Using Cython
g. pyximport
i. Cython Annotations to Analyze a Block
of Code
ii. Adding Some Type Annotations
11.
h. Cython andnumpy
i. Parallelizing the Solution with OpenMP
on One Machine
i. Numba
i. Numba to Compile NumPy for Pandas
j. PyPy
i. Garbage Collection Differences
ii. Running PyPy and Installing Modules
k. A Summary of Speed Improvements
l. When to Use Each Technology
i. Other Upcoming Projects
m. Graphics Processing Units (GPUs)
i. Dynamic Graphs: PyTorch
ii. Basic GPU Profiling
iii. Performance Considerations of GPUs
iv. When to Use GPUs
n. Foreign Function Interfaces
i. ctypes
ii. cffi
iii. f2py
iv. CPython Module
o. Wrap-Up
12.
10. 8. AsynchronousI/O
a. Introduction to Asynchronous Programming
b. How Does async/await Work?
i. Serial Crawler
ii. Gevent
iii. tornado
iv. aiohttp
c. Shared CPU–I/O Workload
i. Serial
ii. Batched Results
iii. Full Async
d. Wrap-Up
11. 9. The multiprocessing Module
a. An Overview of the multiprocessing Module
b. Estimating Pi Using the Monte Carlo Method
c. Estimating Pi Using Processes and Threads
i. Using Python Objects
ii. Replacing multiprocessing with Joblib
iii. Random Numbers in Parallel Systems
iv. Using numpy
d. Finding Prime Numbers
i. Queues of Work
13.
e. Verifying PrimesUsing Interprocess
Communication
i. Serial Solution
ii. Naive Pool Solution
iii. A Less Naive Pool Solution
iv. Using Manager.Value as a Flag
v. Using Redis as a Flag
vi. Using RawValue as a Flag
vii. Using mmap as a Flag
viii. Using mmap as a Flag Redux
f. Sharing numpy Data with multiprocessing
g. Synchronizing File and Variable Access
i. File Locking
ii. Locking a Value
h. Wrap-Up
12. 10. Clusters and Job Queues
a. Benefits of Clustering
b. Drawbacks of Clustering
i. $462 Million Wall Street Loss Through
Poor Cluster Upgrade Strategy
ii. Skype’s 24-Hour Global Outage
c. Common Cluster Designs
d. How to Start a Clustered Solution
14.
e. Ways toAvoid Pain When Using Clusters
f. Two Clustering Solutions
i. Using IPython Parallel to Support
Research
ii. Parallel Pandas with Dask
g. NSQ for Robust Production Clustering
i. Queues
ii. Pub/sub
iii. Distributed Prime Calculation
h. Other Clustering Tools to Look At
i. Docker
i. Docker’s Performance
ii. Advantages of Docker
j. Wrap-Up
13. 11. Using Less RAM
a. Objects for Primitives Are Expensive
i. The array Module Stores Many
Primitive Objects Cheaply
ii. Using Less RAM in NumPy with
NumExpr
b. Understanding the RAM Used in a Collection
c. Bytes Versus Unicode
d. Efficiently Storing Lots of Text in RAM
15.
i. Trying TheseApproaches on 11 Million
Tokens
e. Modeling More Text with Scikit-Learn’s
FeatureHasher
f. Introducing DictVectorizer and FeatureHasher
i. Comparing DictVectorizer and
FeatureHasher on a Real Problem
g. SciPy’s Sparse Matrices
h. Tips for Using Less RAM
i. Probabilistic Data Structures
i. Very Approximate Counting with a 1-
Byte Morris Counter
ii. K-Minimum Values
iii. Bloom Filters
iv. LogLog Counter
v. Real-World Example
14. 12. Lessons from the Field
a. Streamlining Feature Engineering Pipelines
with Feature-engine
i. Feature Engineering for Machine
Learning
ii. The Hard Task of Deploying Feature
Engineering Pipelines
iii. Leveraging the Power of Open Source
Python Libraries
16.
iv. Feature-engine SmoothsBuilding and
Deployment of Feature Engineering
Pipelines
v. Helping with the Adoption of a New
Open Source Package
vi. Developing, Maintaining, and
Encouraging Contribution to Open
Source Libraries
b. Highly Performant Data Science Teams
i. How Long Will It Take?
ii. Discovery and Planning
iii. Managing Expectations and Delivery
c. Numba
i. A Simple Example
ii. Best Practices and Recommendations
iii. Getting Help
d. Optimizing Versus Thinking
e. Adaptive Lab’s Social Media Analytics (2014)
i. Python at Adaptive Lab
ii. SoMA’s Design
iii. Our Development Methodology
iv. Maintaining SoMA
v. Advice for Fellow Engineers
17.
f. Making DeepLearning Fly with
RadimRehurek.com (2014)
i. The Sweet Spot
ii. Lessons in Optimizing
iii. Conclusion
g. Large-Scale Productionized Machine Learning
at Lyst.com (2014)
i. Cluster Design
ii. Code Evolution in a Fast-Moving Start-
Up
iii. Building the Recommendation Engine
iv. Reporting and Monitoring
v. Some Advice
h. Large-Scale Social Media Analysis at Smesh
(2014)
i. Python’s Role at Smesh
ii. The Platform
iii. High Performance Real-Time String
Matching
iv. Reporting, Monitoring, Debugging, and
Deployment
i. PyPy for Successful Web and Data Processing
Systems (2014)
i. Prerequisites
ii. The Database
18.
iii. The WebApplication
iv. OCR and Translation
v. Task Distribution and Workers
vi. Conclusion
j. Task Queues at Lanyrd.com (2014)
i. Python’s Role at Lanyrd
ii. Making the Task Queue Performant
iii. Reporting, Monitoring, Debugging, and
Deployment
iv. Advice to a Fellow Developer
15. Index
2020-04-30: First release
Seehttp://oreilly.com/catalog/errata.csp?isbn=9781492055020
for release details.
The O’Reilly logo is a registered trademark of O’Reilly Media,
Inc. High Performance Python, the cover image, and related
trade dress are trademarks of O’Reilly Media, Inc.
The views expressed in this work are those of the authors, and
do not represent the publisher’s views. While the publisher and
the authors have used good faith efforts to ensure that the
information and instructions contained in this work are
accurate, the publisher and the authors disclaim all
responsibility for errors or omissions, including without
limitation responsibility for damages resulting from the use of or
reliance on this work. Use of the information and instructions
contained in this work is at your own risk. If any code samples
or other technology this work contains or describes is subject
to open source licenses or the intellectual property rights of
others, it is your responsibility to ensure that your use thereof
complies with such licenses and/or rights.
High Performance Python is available under the Creative
Commons Attribution-NonCommercial-NoDerivs 3.0
International License.
978-1-492-05502-0
[LSI]
23.
Foreword
When you thinkabout high performance computing, you might
imagine giant clusters of machines modeling complex weather
phenomena or trying to understand signals in data collected
about far-off stars. It’s easy to assume that only people building
specialized systems should worry about the performance
characteristics of their code. By picking up this book, you’ve
taken a step toward learning the theory and practices you’ll
need to write highly performant code. Every programmer can
benefit from understanding how to build performant systems.
There are an obvious set of applications that are just on the
edge of possible, and you won’t be able to approach them
without writing optimally performant code. If that’s your
practice, you’re in the right place. But there is a much broader
set of applications that can benefit from performant code.
We often think that new technical capabilities are what drives
innovation, but I’m equally fond of capabilities that increase the
accessibility of technology by orders of magnitude. When
something becomes ten times cheaper in time or compute
costs, suddenly the set of applications you can address is
wider than you imagined.
The first time this principle manifested in my own work was
over a decade ago, when I was working at a social media
company, and we ran an analysis over multiple terabytes of
24.
data to determinewhether people clicked on more photos of
cats or dogs on social media.
It was dogs, of course. Cats just have better branding.
This was an outstandingly frivolous use of compute time and
infrastructure at the time! Gaining the ability to apply
techniques that had previously been restricted to sufficiently
high-value applications, such as fraud detection, to a
seemingly trivial question opened up a new world of now-
accessible possibilities. We were able to take what we learned
from these experiments and build a whole new set of products
in search and content discovery.
For an example that you might encounter today, consider a
machine-learning system that recognizes unexpected animals
or people in security video footage. A sufficiently performant
system could allow you to embed that model into the camera
itself, improving privacy or, even if running in the cloud, using
significantly less compute and power—benefiting the
environment and reducing your operating costs. This can free
up resources for you to look at adjacent problems, potentially
building a more valuable system.
We all desire to create systems that are effective, easy to
understand, and performant. Unfortunately, it often feels like
we have to pick two (or one) out of the three! High
Performance Python is a handbook for people who want to
make things that are capable of all three.
25.
This book standsapart from other texts on the subject in three
ways. First, it’s written for us—humans who write code. You’ll
find all of the context you need to understand why you might
make certain choices. Second, Gorelick and Ozsvald do a
wonderful job of curating and explaining the necessary theory
to support that context. Finally, in this updated edition, you’ll
learn the specific quirks of the most useful libraries for
implementing these approaches today.
This is one of a rare class of programming books that will
change the way you think about the practice of programming.
I’ve given this book to many people who could benefit from the
additional tools it provides. The ideas that you’ll explore in its
pages will make you a better programmer, no matter what
language or environment you choose to work in.
Enjoy the adventure.
Hilary Mason,
Data Scientist in Residence at Accel
26.
Preface
Python is easyto learn. You’re probably here because now that
your code runs correctly, you need it to run faster. You like the
fact that your code is easy to modify and you can iterate with
ideas quickly. The trade-off between easy to develop and runs
as quickly as I need is a well-understood and often-bemoaned
phenomenon. There are solutions.
Some people have serial processes that have to run faster.
Others have problems that could take advantage of multicore
architectures, clusters, or graphics processing units. Some
need scalable systems that can process more or less as
expediency and funds allow, without losing reliability. Others
will realize that their coding techniques, often borrowed from
other languages, perhaps aren’t as natural as examples they
see from others.
In this book we will cover all of these topics, giving practical
guidance for understanding bottlenecks and producing faster
and more scalable solutions. We also include some war stories
from those who went ahead of you, who took the knocks so
you don’t have to.
Python is well suited for rapid development, production
deployments, and scalable systems. The ecosystem is full of
27.
people who areworking to make it scale on your behalf,
leaving you more time to focus on the more challenging tasks
around you.
28.
Who This BookIs For
You’ve used Python for long enough to have an idea about why
certain things are slow and to have seen technologies like
Cython, numpy, and PyPy being discussed as possible
solutions. You might also have programmed with other
languages and so know that there’s more than one way to
solve a performance problem.
While this book is primarily aimed at people with CPU-bound
problems, we also look at data transfer and memory-bound
solutions. Typically, these problems are faced by scientists,
engineers, quants, and academics.
We also look at problems that a web developer might face,
including the movement of data and the use of just-in-time (JIT)
compilers like PyPy and asynchronous I/O for easy-win
performance gains.
It might help if you have a background in C (or C++, or maybe
Java), but it isn’t a prerequisite. Python’s most common
interpreter (CPython—the standard you normally get if you type
python at the command line) is written in C, and so the hooks
and libraries all expose the gory inner C machinery. There are
lots of other techniques that we cover that don’t assume any
knowledge of C.
You might also have a lower-level knowledge of the CPU,
memory architecture, and data buses, but again, that’s not
Who This BookIs Not For
This book is meant for intermediate to advanced Python
programmers. Motivated novice Python programmers may be
able to follow along as well, but we recommend having a solid
Python foundation.
We don’t cover storage-system optimization. If you have a SQL
or NoSQL bottleneck, then this book probably won’t help you.
What You’ll Learn
Your authors have been working with large volumes of data, a
requirement for I want the answers faster! and a need for
scalable architectures, for many years in both industry and
academia. We’ll try to impart our hard-won experience to save
you from making the mistakes that we’ve made.
At the start of each chapter, we’ll list questions that the
following text should answer. (If it doesn’t, tell us and we’ll fix it
in the next revision!)
We cover the following topics:
Background on the machinery of a computer so you
know what’s happening behind the scenes
Lists and tuples—the subtle semantic and speed
differences in these fundamental data structures
Dictionaries and sets—memory allocation strategies
and access algorithms in these important data
31.
structures
Iterators—how to writein a more Pythonic way and
open the door to infinite data streams using iteration
Pure Python approaches—how to use Python and its
modules effectively
Matrices with numpy—how to use the beloved numpy
library like a beast
Compilation and just-in-time computing—processing
faster by compiling down to machine code, making
sure you’re guided by the results of profiling
Concurrency—ways to move data efficiently
multiprocessing—various ways to use the built-in
multiprocessing library for parallel computing and
to efficiently share numpy matrices, and some costs
and benefits of interprocess communication (IPC)
Cluster computing—convert your multiprocessing
code to run on a local or remote cluster for both
research and production systems
Using less RAM—approaches to solving large
problems without buying a humungous computer
Lessons from the field—lessons encoded in war stories
from those who took the blows so you don’t have to
Python 3
Python 3 is the standard version of Python as of 2020, with
Python 2.7 deprecated after a 10-year migration process. If
you’re still on Python 2.7, you’re doing it wrong—many libraries
32.
are no longersupported for your line of Python, and support
will become more expensive over time. Please do the
community a favor and migrate to Python 3, and make sure
that all new projects use Python 3.
In this book, we use 64-bit Python. Whilst 32-bit Python is
supported, it is far less common for scientific work. We’d
expect all the libraries to work as usual, but numeric precision,
which depends on the number of bits available for counting, is
likely to change. 64-bit is dominant in this field, along with *nix
environments (often Linux or Mac). 64-bit lets you address
larger amounts of RAM. *nix lets you build applications that can
be deployed and configured in well-understood ways with well-
understood behaviors.
If you’re a Windows user, you’ll have to buckle up. Most of
what we show will work just fine, but some things are OS-
specific, and you’ll have to research a Windows solution. The
biggest difficulty a Windows user might face is the installation
of modules: research in sites like Stack Overflow should give
you the solutions you need. If you’re on Windows, having a
virtual machine (e.g., using VirtualBox) with a running Linux
installation might help you to experiment more freely.
Windows users should definitely look at a packaged solution
like those available through Anaconda, Canopy, Python(x,y), or
Sage. These same distributions will make the lives of Linux
and Mac users far simpler too.
33.
Changes from Python2.7
If you’ve upgraded from Python 2.7, you might not be aware of
a few relevant changes:
/ meant integer division in Python 2.7, whereas it
performs float division in Python 3.
str and unicode were used to represent text data in
Python 2.7; in Python 3, everything is a str, and these
are always Unicode. For clarity, a bytes type is used if
we’re using unencoded byte sequences.
If you’re in the process of upgrading your code, two good
guides are “Porting Python 2 Code to Python 3” and
“Supporting Python 3: An in-depth guide”. With a distribution
like Anaconda or Canopy, you can run both Python 2 and
Python 3 simultaneously—this will simplify your porting.
License
This book is licensed under Creative Commons Attribution-
NonCommercial-NoDerivs 3.0.
You’re welcome to use this book for noncommercial purposes,
including for noncommercial teaching. The license allows only
for complete reproductions; for partial reproductions, please
contact O’Reilly (see “How to Contact Us”). Please attribute the
book as noted in the following section.
34.
We negotiated thatthe book should have a Creative Commons
license so the contents could spread further around the world.
We’d be quite happy to receive a beer if this decision has
helped you. We suspect that the O’Reilly staff would feel
similarly about the beer.
How to Make an Attribution
The Creative Commons license requires that you attribute your
use of a part of this book. Attribution just means that you
should write something that someone else can follow to find
this book. The following would be sensible: “High Performance
Python, 2nd ed., by Micha Gorelick and Ian Ozsvald (O’Reilly).
Copyright 2020 Micha Gorelick and Ian Ozsvald, 978-1-492-
05502-0.”
Errata and Feedback
We encourage you to review this book on public sites like
Amazon—please help others understand if they would benefit
from this book! You can also email us at
feedback@highperformancepython.com.
We’re particularly keen to hear about errors in the book,
successful use cases where the book has helped you, and high
performance techniques that we should cover in the next
edition. You can access the web page for this book at
https://oreil.ly/high-performance-python-2e.
35.
Complaints are welcomedthrough the instant-complaint-
transmission-service > /dev/null.
Conventions Used in This Book
The following typographical conventions are used in this book:
Italic
Indicates new terms, URLs, email addresses, filenames,
and file extensions.
Constant width
Used for program listings, as well as within paragraphs to
refer to program elements such as variable or function
names, databases, datatypes, environment variables,
statements, and keywords.
Constant width bold
Shows commands or other text that should be typed literally
by the user.
Constant width italic
Shows text that should be replaced with user-supplied
values or by values determined by context.
TIP
This element signifies a tip, suggestion, or critical thinking question.
36.
NOTE
This element signifiesa general note.
WARNING
This element indicates a warning or caution.
Using Code Examples
Supplemental material (code examples, exercises, etc.) is
available for download at
https://github.com/mynameisfiber/high_performance_python_2
e.
If you have a technical question or a problem using the code
examples, please send email to bookquestions@oreilly.com.
This book is here to help you get your job done. In general, if
example code is offered with this book, you may use it in your
programs and documentation. You do not need to contact us
for permission unless you’re reproducing a significant portion of
the code. For example, writing a program that uses several
chunks of code from this book does not require permission.
Selling or distributing examples from O’Reilly books does
require permission. Answering a question by citing this book
and quoting example code does not require permission.
Incorporating a significant amount of example code from this
37.
book into yourproduct’s documentation does require
permission.
If you feel your use of code examples falls outside fair use or
the permission given above, feel free to contact us at
permissions@oreilly.com.
O’Reilly Online Learning
NOTE
For more than 40 years, O’Reilly Media has provided technology and
business training, knowledge, and insight to help companies succeed.
Our unique network of experts and innovators share their
knowledge and expertise through books, articles, and our
online learning platform. O’Reilly’s online learning platform
gives you on-demand access to live training courses, in-depth
learning paths, interactive coding environments, and a vast
collection of text and video from O’Reilly and 200+ other
publishers. For more information, visit http://oreilly.com.
How to Contact Us
Please address comments and questions concerning this book
to the publisher:
O’Reilly Media, Inc.
38.
1005 Gravenstein HighwayNorth
Sebastopol, CA 95472
800-998-9938 (in the United States or Canada)
707-829-0515 (international or local)
707-829-0104 (fax)
Email bookquestions@oreilly.com to comment or ask technical
questions about this book.
For news and more information about our books and courses,
see our website at http://oreilly.com.
Find us on Facebook: http://facebook.com/oreilly
Follow us on Twitter: http://twitter.com/oreillymedia
Watch us on YouTube: http://youtube.com/oreillymedia
Acknowledgments
Hilary Mason wrote our foreword—thanks for composing such
a wonderful opening narrative for our book. Giles Weaver and
Dimitri Denisjonok provided invaluable technical feedback on
this edition; great work, chaps.
Thanks to Patrick Cooper, Kyran Dale, Dan Foreman-Mackey,
Calvin Giles, Brian Granger, Jamie Matthews, John
39.
Montgomery, Christian SchouOxvig, Matt “snakes” Reiferson,
Balthazar Rouberol, Michael Skirpan, Luke Underwood, Jake
Vanderplas, and William Winter for invaluable feedback and
contributions.
Ian thanks his wife, Emily, for letting him disappear for another
eight months to write this second edition (thankfully, she’s
terribly understanding). Ian apologizes to his dog for sitting and
writing rather than walking in the woods quite as much as she’d
have liked.
Micha thanks Marion and the rest of his friends and family for
being so patient while he learned to write.
O’Reilly editors are rather lovely to work with; do strongly
consider talking to them if you want to write your own book.
Our contributors to the “Lessons from the Field” chapter very
kindly shared their time and hard-won lessons. We give thanks
to Soledad Galli, Linda Uruchurtu, Vanentin Haenel, and
Vincent D. Warmerdam for this edition and to Ben Jackson,
Radim Řehůřek, Sebastjan Trepca, Alex Kelly, Marko Tasic,
and Andrew Godwin for their time and effort during the
previous edition.
40.
Chapter 1. Understanding
PerformantPython
QUESTIONS YOU’LL BE ABLE TO ANSWER AFTER THIS
CHAPTER
What are the elements of a computer’s architecture?
What are some common alternate computer architectures?
How does Python abstract the underlying computer architecture?
What are some of the hurdles to making performant Python code?
What strategies can help you become a highly performant programmer?
Programming computers can be thought of as moving bits of
data and transforming them in special ways to achieve a
particular result. However, these actions have a time cost.
Consequently, high performance programming can be thought
of as the act of minimizing these operations either by reducing
the overhead (i.e., writing more efficient code) or by changing
the way that we do these operations to make each one more
meaningful (i.e., finding a more suitable algorithm).
Let’s focus on reducing the overhead in code in order to gain
more insight into the actual hardware on which we are moving
these bits. This may seem like a futile exercise, since Python
works quite hard to abstract away direct interactions with the
hardware. However, by understanding both the best way that
41.
bits can bemoved in the real hardware and the ways that
Python’s abstractions force your bits to move, you can make
progress toward writing high performance programs in Python.
The Fundamental Computer System
The underlying components that make up a computer can be
simplified into three basic parts: the computing units, the
memory units, and the connections between them. In addition,
each of these units has different properties that we can use to
understand them. The computational unit has the property of
how many computations it can do per second, the memory unit
has the properties of how much data it can hold and how fast
we can read from and write to it, and finally, the connections
have the property of how fast they can move data from one
place to another.
Using these building blocks, we can talk about a standard
workstation at multiple levels of sophistication. For example,
the standard workstation can be thought of as having a central
processing unit (CPU) as the computational unit, connected to
both the random access memory (RAM) and the hard drive as
two separate memory units (each having different capacities
and read/write speeds), and finally a bus that provides the
connections between all of these parts. However, we can also
go into more detail and see that the CPU itself has several
memory units in it: the L1, L2, and sometimes even the L3 and
L4 cache, which have small capacities but very fast speeds
(from several kilobytes to a dozen megabytes). Furthermore,
42.
new computer architecturesgenerally come with new
configurations (for example, Intel’s SkyLake CPUs replaced the
frontside bus with the Intel Ultra Path Interconnect and
restructured many connections). Finally, in both of these
approximations of a workstation we have neglected the
network connection, which is effectively a very slow connection
to potentially many other computing and memory units!
To help untangle these various intricacies, let’s go over a brief
description of these fundamental blocks.
Computing Units
The computing unit of a computer is the centerpiece of its
usefulness—it provides the ability to transform any bits it
receives into other bits or to change the state of the current
process. CPUs are the most commonly used computing unit;
however, graphics processing units (GPUs) are gaining
popularity as auxiliary computing units. They were originally
used to speed up computer graphics but are becoming more
applicable for numerical applications and are useful thanks to
their intrinsically parallel nature, which allows many
calculations to happen simultaneously. Regardless of its type,
a computing unit takes in a series of bits (for example, bits
representing numbers) and outputs another set of bits (for
example, bits representing the sum of those numbers). In
addition to the basic arithmetic operations on integers and real
numbers and bitwise operations on binary numbers, some
computing units also provide very specialized operations, such
43.
as the “fusedmultiply add” operation, which takes in three
numbers, A, B, and C, and returns the value A * B + C.
The main properties of interest in a computing unit are the
number of operations it can do in one cycle and the number of
cycles it can do in one second. The first value is measured by
its instructions per cycle (IPC), while the latter value is
measured by its clock speed. These two measures are always
competing with each other when new computing units are
being made. For example, the Intel Core series has a very high
IPC but a lower clock speed, while the Pentium 4 chip has the
reverse. GPUs, on the other hand, have a very high IPC and
clock speed, but they suffer from other problems like the slow
communications that we discuss in “Communications Layers”.
Furthermore, although increasing clock speed almost
immediately speeds up all programs running on that
computational unit (because they are able to do more
calculations per second), having a higher IPC can also
drastically affect computing by changing the level of
vectorization that is possible. Vectorization occurs when a CPU
is provided with multiple pieces of data at a time and is able to
operate on all of them at once. This sort of CPU instruction is
known as single instruction, multiple data (SIMD).
In general, computing units have advanced quite slowly over
the past decade (see Figure 1-1). Clock speeds and IPC have
both been stagnant because of the physical limitations of
making transistors smaller and smaller. As a result, chip
1
44.
manufacturers have beenrelying on other methods to gain
more speed, including simultaneous multithreading (where
multiple threads can run at once), more clever out-of-order
execution, and multicore architectures.
Hyperthreading presents a virtual second CPU to the host
operating system (OS), and clever hardware logic tries to
interleave two threads of instructions into the execution units
on a single CPU. When successful, gains of up to 30% over a
single thread can be achieved. Typically, this works well when
the units of work across both threads use different types of
execution units—for example, one performs floating-point
operations and the other performs integer operations.
Out-of-order execution enables a compiler to spot that some
parts of a linear program sequence do not depend on the
results of a previous piece of work, and therefore that both
pieces of work could occur in any order or at the same time. As
long as sequential results are presented at the right time, the
program continues to execute correctly, even though pieces of
work are computed out of their programmed order. This
enables some instructions to execute when others might be
blocked (e.g., waiting for a memory access), allowing greater
overall utilization of the available resources.
Finally, and most important for the higher-level programmer,
there is the prevalence of multicore architectures. These
architectures include multiple CPUs within the same unit, which
increases the total capability without running into barriers to
45.
making each individualunit faster. This is why it is currently
hard to find any machine with fewer than two cores—in this
case, the computer has two physical computing units that are
connected to each other. While this increases the total number
of operations that can be done per second, it can make writing
code more difficult!
Figure 1-1. Clock speed of CPUs over time (from CPU DB)
Simply adding more cores to a CPU does not always speed up
a program’s execution time. This is because of something
known as Amdahl’s law. Simply stated, Amdahl’s law is this: if
a program designed to run on multiple cores has some
subroutines that must run on one core, this will be the limitation
for the maximum speedup that can be achieved by allocating
more cores.
For example, if we had a survey we wanted one hundred
people to fill out, and that survey took 1 minute to complete, we
could complete this task in 100 minutes if we had one person
asking the questions (i.e., this person goes to participant 1,
asks the questions, waits for the responses, and then moves to
participant 2). This method of having one person asking the
questions and waiting for responses is similar to a serial
process. In serial processes, we have operations being
satisfied one at a time, each one waiting for the previous
operation to complete.
However, we could perform the survey in parallel if we had two
people asking the questions, which would let us finish the
46.
process in only50 minutes. This can be done because each
individual person asking the questions does not need to know
anything about the other person asking questions. As a result,
the task can easily be split up without having any dependency
between the question askers.
Adding more people asking the questions will give us more
speedups, until we have one hundred people asking questions.
At this point, the process would take 1 minute and would be
limited simply by the time it takes a participant to answer
questions. Adding more people asking questions will not result
in any further speedups, because these extra people will have
no tasks to perform—all the participants are already being
asked questions! At this point, the only way to reduce the
overall time to run the survey is to reduce the amount of time it
takes for an individual survey, the serial portion of the problem,
to complete. Similarly, with CPUs, we can add more cores that
can perform various chunks of the computation as necessary
until we reach a point where the bottleneck is the time it takes
for a specific core to finish its task. In other words, the
bottleneck in any parallel calculation is always the smaller
serial tasks that are being spread out.
Furthermore, a major hurdle with utilizing multiple cores in
Python is Python’s use of a global interpreter lock (GIL). The
GIL makes sure that a Python process can run only one
instruction at a time, regardless of the number of cores it is
currently using. This means that even though some Python
code has access to multiple cores at a time, only one core is
47.
running a Pythoninstruction at any given time. Using the
previous example of a survey, this would mean that even if we
had 100 question askers, only one person could ask a question
and listen to a response at a time. This effectively removes any
sort of benefit from having multiple question askers! While this
may seem like quite a hurdle, especially if the current trend in
computing is to have multiple computing units rather than
having faster ones, this problem can be avoided by using other
standard library tools, like multiprocessing (Chapter 9),
technologies like numpy or numexpr (Chapter 6), Cython
(Chapter 7), or distributed models of computing (Chapter 10).
NOTE
Python 3.2 also saw a major rewrite of the GIL, which made the system
much more nimble, alleviating many of the concerns around the system
for single-thread performance. Although it still locks Python into running
only one instruction at a time, the GIL now does better at switching
between those instructions and doing so with less overhead.
Memory Units
Memory units in computers are used to store bits. These could
be bits representing variables in your program or bits
representing the pixels of an image. Thus, the abstraction of a
memory unit applies to the registers in your motherboard as
well as your RAM and hard drive. The one major difference
between all of these types of memory units is the speed at
which they can read/write data. To make things more
48.
complicated, the read/writespeed is heavily dependent on the
way that data is being read.
For example, most memory units perform much better when
they read one large chunk of data as opposed to many small
chunks (this is referred to as sequential read versus random
data). If the data in these memory units is thought of as pages
in a large book, this means that most memory units have better
read/write speeds when going through the book page by page
rather than constantly flipping from one random page to
another. While this fact is generally true across all memory
units, the amount that this affects each type is drastically
different.
In addition to the read/write speeds, memory units also have
latency, which can be characterized as the time it takes the
device to find the data that is being used. For a spinning hard
drive, this latency can be high because the disk needs to
physically spin up to speed and the read head must move to
the right position. On the other hand, for RAM, this latency can
be quite small because everything is solid state. Here is a short
description of the various memory units that are commonly
found inside a standard workstation, in order of read/write
speeds:
Spinning hard drive
Long-term storage that persists even when the computer is
shut down. Generally has slow read/write speeds because
the disk must be physically spun and moved. Degraded
2
49.
performance with randomaccess patterns but very large
capacity (10 terabyte range).
Solid-state hard drive
Similar to a spinning hard drive, with faster read/write
speeds but smaller capacity (1 terabyte range).
RAM
Used to store application code and data (such as any
variables being used). Has fast read/write characteristics
and performs well with random access patterns, but is
generally limited in capacity (64 gigabyte range).
L1/L2 cache
Extremely fast read/write speeds. Data going to the CPU
must go through here. Very small capacity (megabytes
range).
Figure 1-2 gives a graphic representation of the differences
between these types of memory units by looking at the
characteristics of currently available consumer hardware.
A clearly visible trend is that read/write speeds and capacity
are inversely proportional—as we try to increase speed,
capacity gets reduced. Because of this, many systems
implement a tiered approach to memory: data starts in its full
state in the hard drive, part of it moves to RAM, and then a
much smaller subset moves to the L1/L2 cache. This method
of tiering enables programs to keep memory in different places
depending on access speed requirements. When trying to
optimize the memory patterns of a program, we are simply
[74] The lineswere written in some lady’s autograph album during
this visit.
[75] The Christian Year: Septuagesima Sunday, closing stanza.
[76] Arthur, eldest son of Arthur Champernowne, Esq., of Dartington
Hall, died during this year, 1831, aged 17. His next brother Henry
died in 1851, aged 36.
[77] Newman, Letters and Correspondence, ii., 73.
[78] Of course in allusion to the proverb that rain on July 15 (S.
Swithun’s Day) means a more or less prolonged downpour.
[79] William I., King of the Netherlands, formerly William Frederick,
Prince of Orange.
[80] Thomas Elrington, M.A., D.D., formerly President of Trinity
College, Dublin, an active and devoted prelate. He lived until July 12,
1835.
[81] The name of the Bishop who was the great antagonist of the
Lollards, Fellow of Oriel in his day, is properly spelled Pecock.
[82] ‘The Time-Spirit of the Nineteenth Century,’ in Problems and
Persons, by Wilfrid Ward. Longmans, 1903.
[83] Robert Isaac Wilberforce. His mind was truly profound, and it
was ‘authentic,’ to borrow the word beautifully applied to him in a
memorial verse of his friend Mr. Aubrey de Vere.
[84] On Justice as a Principle of Divine Governance. University
Sermons, VI.
[85] Neander: this playful Hellenising of Newman’s name was
general, at one time, among Oxonians of his own circle.
[86] Henry Bellenden Bulteel (1800-1866), a Devonshire man, Fellow
and Tutor of Exeter College, Hurrell’s former contemporary at Eton.
He got into difficulties with the Church of England and the University
in 1831; after his calling the Heads of Houses ‘dumb dogs,’ from the
pulpit of S. Mary’s, Bishop Bagot revoked his licence; he then
married a pastry-cook’s sister in the High Street, spent £4000
building the Baptist Chapel in the Commercial Road, and set up as
an independent dissenting minister. He was the anonymous author of
The Oxford Argo. A good deal laughed at in his day, Bulteel had,
according to evidence, the sympathy of Hurrell Froude in his ill
52.
fortunes. ‘Froude wentabout for days with a rueful countenance,
and could only say: “Poor Bulteel!”’ Reminiscences, Mozley, i., 228.
[87] James Yonge, M.D., F.C.P., 1794-1870, a graduate of Exeter
College, Oxford, and resident at Plymouth, where his practice was
famous in its day, all over England.
[88] Of Oriel College.
[89] Hurrell had visited Keble there early in April, and caught a fresh
cold.
[90] See p. 257.
[91] Prosperity, in Lyra Apostolica. Edited by H. C. Beeching, M.A.
London: Methuen [1900], p. 146.
[92] Mary Sophia Newman, the youngest of the family, died, aged 17,
on January 5, 1828.
[93] Histoire de la Conquête de l’Angleterre par les Normands. Par
Augustin Thierry. Paris: Santelet, 1826. Tomes 1-4, 2de
edition, 8o.
[94] A sentimental complaining fellow: the ‘dreary prospects’ being
the prospects of a single life devoted to moral reforms.
[95] The usurper of the Portuguese crown, third son of King John VI.
The English destroyed his fleet off Cape St. Vincent, July 5, 1833.
[96] ‘Stare’ in the Remains.
[97] Six weeks later, an English lady, Miss Frere, writes home from
Malta of our three tourists, ‘Archdeacon Froude, his son, and another
clergyman’ … ‘all very agreeable.’ She laments the ill-health of Mr.
Newman, but adds that ‘the son, on whose account they are
travelling, is quite well.’ Works of the Rt. Hon. John Hookham Frere,
vol. i., Memoir, by the Rt. Hon. Sir Bartle Frere. London: Pickering,
1874, p. 242.
[98] Newman says, ‘It was at Rome that we began the Lyra
Apostolica’ (Apologia, 1890, p. 34); this letter antedates the arrival at
Rome by some days. Newman dates the Lyra from Froude’s choosing
its motto from the Odyssey on the eve of magazine publication.
[99] The Rev. C. A. Ogilvie? or Frederick Oakeley? or the young
Devonian Nutcombe Oxenham, who, like Isaac Williams, his tutor
and lifelong friend, was a Scholar of Trinity? The associates of Mr.
Williams were almost exclusively of Oriel.
53.
[100] Froude hadvisited Samuel Wilberforce there, at Brighstone.
[101] ‘We are keeping the most wretched Christmas Day … by bad
fortune we are again taking in coals…. This morning we saw a poor
fellow in the Lazaret, close to us, cut off from the ordinances of his
Church, saying his prayers with his face to the house of God in his
sight over the water; and it is a confusion of face to me…. The bells
are beautiful here … deep and sonorous, and they have been going
all morning: to me very painfully.’ Newman to his sister Harriett,
Letters and Correspondence, i., 274.
[102] Major John Longley, afterwards Lieutenant-Governor of
Dominica. Charles Thomas Longley, Head Master of Harrow School
from 1829 to 1836, became Archbishop of Canterbury. Cythera is
Cerigo.
[103] Spiridion or Spiridon, patron of the island, Bishop of Tremithus
near Salamis, present at the first General Council of Nice, and at the
Council of Sardica. The Greeks keep his feast on the 12th, the
Western Church on the 14th of December.
[104] [Mount Scollis in Elis.]
[105] Correspondence, i., 293-300, passim: and p. 332.
[106] The well-known novel by Susan Edmonstone Ferrier, published
at first anonymously in 1818. A beautiful edition, marking some
revival of popularity, was issued in 1902.
[107] He could jump well, too: ‘a larking thing for a Don!’ as he tells
his mother. Letters and Correspondence, i., 159.
[108] Provinces now merged in the kingdom of Roumania.
[109] Life and Letters of Frederick William Faber, D.D., Priest of the
Oratory of St. Philip Neri, by John Edward Bowden of the same
Congregation. Richards, 1869, p. 78.
[110] A quaint phrase from the Oriel Statutes. They read: ‘Quoniam
omnia existentia tendunt ad non esse.’
[111] ‘I am drawn to [Sicily] as by a loadstone. The chief sight has
been Egesta: its ruins with its Temple. O wonderful sight! full of the
most strange pleasure…. It has been a day in my life to have seen
Egesta … really, my mind goes back to the recollection of last
Monday and Tuesday, as one smells again and again at a sweet
54.
flower.’ Newman tohis sister Harriett, Letters and Correspondence, i.,
302.
[112] Joseph Severn, Keats’ friend, 1793-1879.
[113] Friedrich Overbeck, 1789-1869. He became a Catholic in 1814.
[114] Rev. Hugh James Rose, founder and editor: 1795-1838, M.A. of
Cambridge University, Rector of Hadleigh, Suffolk; Principal of King’s
College, London.
[115] ‘On The Hateful Party: probably the Liberal Party of 1833.’ Lyra
Apostolica, Beeching’s edition, p. 140. But possibly the reference is
to the English Reformers, and the poet’s idea that they should be
considered serviceable, in a way, to the very spirit of Catholicism
which they did their best to destroy. However, the context of
Froude’s letter to Keble, going on to mention, as it does, a current
political interest as inspiration (not forthcoming) for the next copy of
verses, tends to bear out Mr. Beeching’s theory. Lyra Apostolica
began as a separate poetic section of The British Magazine in June,
1833. The poem above is an unconscious expansion of S.
Augustine’s Ne putetis gratis esse malos in hoc mundo, et nihil boni
de illis agere Deum.
[116] Exactly what this interpretation was is not apparent from Lord
Grey’s biographers, nor from his Letters. On this ground, he was
suspect, after his significant remark in the House of Lords, on May 7,
1832: ‘I do not like, in this free country, to use the word Monarchy.’
[117] Christian Carl Josias, Baron Bunsen, 1791-1860, Minister
Plenipotentiary, and German Ambassador to England from 1841-
1854.
[118] Misread, and misprinted ‘ability’ in the Remains.
[119] The first audit at Oriel, Mr. Christie being then, as Froude’s
successor, Junior Treasurer of the College.
[120] Afterwards Cardinal Archbishop of Westminster.
[121] [All this must not be taken literally, being a jesting way of
stating to a friend what really was the fact, viz., that he and another
availed themselves of the opportunity of meeting a learned Romanist
to ascertain the ultimate points at issue between the Churches.]
Note, Remains, 1838, i., 306.
55.
[122] Newman writesto a friend then out of England, R. F. Wilson,
Esq., on Sept. 8 following: ‘… If we look into history, whether in the
age of the Apostles, St. Ambrose’s, or St. Becket’s [sic], still the
people were the fulcrum of the Church’s power. So they may be
again. Therefore, expect on your return … to see us all cautious,
long-headed, unfeeling, unflinching Radicals.’ Newman, Letters and
Correspondence, i., 399.
[123] The contributors to the Lyra numbered but six, in the end. Mr.
Christie is not among them.
[124] Sir Edmund Walker Head, Bart., 1805-1868, an accomplished
Oriel man, Fellow of Merton, M.A., D.C.L., F.R.S., and K.C.B.,
Governor-General of Canada, author of a Handbook of the Spanish
and French Schools of Painting, and of various philological and
literary essays. Hurrell might have named also a young Mr.
Gladstone, late of Christ Church, already eminent in the Oxford
academic world and beyond it, who spent a good part of this year,
1832-1833, in Italy.
[125] William Whewell, 1794-1866: Master of Trinity College,
Cambridge. The particular ‘book’ may be, judging from the context
and the date, the Astronomy and General Physics, considered with
Reference to Natural Theology.
[126] Adam Sedgwick, 1785-1873: Woodwardian Professor of
Geology in the University of Cambridge.
[127] Connop Thirlwall, 1797-1875: historian and Bishop of S.
David’s.
[128] Julius Charles Hare, 1795-1855, of Trinity College, Cambridge,
afterwards Incumbent of Hurstmonceaux, and Archdeacon of Lewes.
Like Thirlwall, he was a familiar friend of Baron Bunsen. For a
passing instance of the ‘puffing’ contemned by Froude, see
Memorials of a Quiet Life, 1876, iii., 224.
[129] John of Salisbury, afterwards Bishop of Chartres, the
companion and biographer of S. Thomas à Becket, and ‘for thirty
years the central figure of English learning.’ (Stubbs, Lectures, p.
139.) He was born circa A.D. 1118, and died in the year 1180.
[130] Anglicised Latin, that is: Latin taught with the Continental
pronunciation, or any approach to it, being unheard-of in the
England of that time.
56.
[131] Remains ofWilliam Ralph Churton (Private Impression), 1830,
p. 162.
[132] Reminiscences, etc., i., 294.
[133] Froude means the Abbé de Lamennais, Lacordaire,
Montalembert, and their friends, to whom he was strongly attracted.
Lacordaire, newly withdrawn from L’Avenir, was at this time at Nôtre
Dame, not yet a Dominican. What a friend he would have been for
R. H. F.!
[134] The Absolutions, in the Book of Common Prayer.
[135] [Here, and in many other places, it is the author’s way to bring
forward as motives of action for himself and others what were but
secondary, and rather the reflection of his mind upon its acts, and
that as if with a view to avoid the profession of high and great
things. Such, too, is the Scripture way: as where we are told to do
good to our enemies, as if ‘to heap coals of fire on their heads,’ and
to take the lowest place, in order to ‘have worship in the presence’
of spectators.] Note, Remains, 1838, i., 314.
[136] The motto appears first in The British Magazine, Dec., 1833,
followed by: ‘Compare Daniel i., 7.’
[137] Dan. xii., 13.
[138] The reading here, slightly altered and bettered from the copy
printed in the Remains, is from Lyra Apostolica, 1836.
[139] Ezek. xxvii., 11.
[140] The text in 1833 has ‘wandering.’ The Rev. H. C. Beeching
adopts it, with this Note: ‘Perhaps the line should run: “Far-
wandering from the East.”’
[141] In The British Magazine for May 1835 (vii., 518) this poem first
appears, and there bears no motto, and has ‘The Exchange’ for title.
The title in the Remains is ‘Farewell to Toryism.’
[142] S. Paul, Eph. ii., 8.
[143] The Anglican Revival, by J. H. Overton, D.D. London: Blackie,
1897, p. 206.
[144] James William Bowden, 1798-1844, the most zealous lay
participant in the early Movement.
57.
[145] Reminiscences, Mozley,i., 580.
[146] Specimens of the Table-Talk of the late Samuel Taylor
Coleridge. Murray, 1835, ii., 26. The curious inference may be made,
in regard to Froude’s Editors, that they did not light upon Coleridge’s
passage at first-hand, but that somebody brought it to their
attention: they, on their part, had accomplished, by chance, the
extraordinary feat of ignoring Coleridge. ‘In extreme old age
Newman wrote to a friend: “I never read a word of Kant. I never
read a word of Coleridge…. I could say the same of Hurrell Froude,
and also of Pusey and Keble.”’ Newman, by William Barry. Literary
Lives Series. Hodder & Stoughton, 1904, p. 30. The inclusion of the
name of Dr. Pusey, Germanic by temperament and by his line of
study, is remarkable.
[147] This was July 9, 1833. The Froudes had never had word by
post since he had parted from them, and they knew something had
gone wrong.
[148] Arthur Philip Perceval, 1799-1853, of Oriel, brother of Lord
Arden, and Vicar of East Horsley; afterwards Royal chaplain, and
expounder of High Church principles, on one celebrated occasion,
before Queen Victoria.
[149] Nobody but Dean Hook calls him ‘learned,’ and the concession
may have been thrown in to balance the depreciatory context. ‘With
a kind heart and glowing sensibilities, Mr. Froude united a mind of
wonderful power, saturated with learning, and from its very
luxuriance productive of weeds, together with many flowers.’ A Call
to Union on the Principles of the English Reformation, 2nd ed., 1838,
p. 167.
[150] Remains of R. H. F., part i., ii., 307. On the Causes of the
Superior Excellence of the Poetry of Rude Ages.
[151] This is not among his published Sermons, but may have gone
to make up the mosaic of State Interference papers in the Remains,
part ii., i., 184-269.
[152] ‘Snug’ in Remains.
[153] The Queen.
[154] The British Magazine for July, 1833, vol. iii., The Appointment
of Bishops by the State. Correspondence under the same title opens
in the September number, v., 290 et seq., signed ‘F.’
58.
[155] Newman figuresas responsible for it in the valuable Appendix
to the third volume of the Life of Dr. Pusey.
[156] Correspondence, i., 421.
[157] John Mitchinson Calvert of Crosthwaite, Cumberland, and of
Oriel, M.A., M.D., who knew Froude well, and was his own age.
[158] S. Thomas à Becket’s word for the poor.
[159] The ‘man’ is Jean Bon de St. André, Deputy to the Convention
for the Department of Lot during the Reign of Terror; he was
preferred by Napoleon, and died in 1813. He was present when Earl
Howe defeated the French fleet on June 1, 1794, and distinguished
himself after the fashion commemorated in the Elegy which
appeared in the Anti-Jacobin Review and Magazine on May 14, 1798,
and was the joint production of Canning, Gifford, and Frere:
‘Poor John was a gallant captain
In battles much delighting;
He fled full soon,
On the first of June,
But he bade the rest keep fighting.’
The stave appears again, of course, in Poetry of the Anti-Jacobin,
Edited with Explanatory notes by Charles Edmonds, 3rd edition,
London, Sampson Low, etc., 1890, p. 187. The New Anti-Jacobin, a
brilliant monthly advocating high Tory principles, sprang into life for
April and May, 1833, and died. Froude must have been deeply
interested in it. Nothing we know of him is more engaging than this
very gallant applying to himself of such a quotation at such a time,
and for such a reason.
[160] Rev. Anthony Buller, 1809-1881, afterwards Rector of Mary
Tavy; ordained at Exeter on Oct. 27 of this year.
[161] The Arians of the Fourth Century.
[162] Mr. Rose’s friend, William Rowe Lyall, 1788-1857, then
Archdeacon of Colchester, afterwards Dean of Canterbury. Owing to
Mr. Rose’s failing health, the two exchanged livings this year, and
Archdeacon Lyall remained at Hadleigh till 1841, Mr. Rose having
died in Italy.
[163] Of 1831.
59.
[164] William HartColeridge, 1789-1849, brother to George, Master
of Ottery Free School; first Bishop of Barbados and the Leeward
Islands, 1824, and reorganiser of Codrington College. He resigned in
1841, when the diocese was divided.
[165] ‘Unconnected’ in the text of the Remains, but corrected in the
little list of errata.
[166] This, of course, is one of the passages upon which the Editors
of the Remains rely to prove negatively their contention that
Froude’s Anglicanism was immutably fixed. The ‘Popery’ in this
passage is not in its ‘grammatical sense,’ but plainly refers to
furtherance of O’Connell’s measures.
[167] Jeremy Collier’s Ecclesiastical History of Great Britain, first
published in two volumes folio in 1708, 1714.
[168] Lieutenant-Colonel J. Lyons Nixon, L.G.
[169] [If they had had the whole body of the English Church in
agreement with them. The sort and amount of alteration which the
writer probably contemplated may be seen in Tracts for the Times,
Via Media.] Note, Remains, i., 348. So sure was Newman of R. H. F.’s
posthumous approbation.
[170] Thomas Fowell Buxton, 1786-1845, M.P., knighted in 1840,
prison reformer (brother-in-law of Mrs. Fry), and William
Wilberforce’s successor as head of the Anti-slavery party in England.
[171] John Spedding Froude.
[172] A ‘Z’ stood, in Tractarian, for an ‘Establishment man.’
[173] Thus in the Remains, but ‘if,’ by a misprint, in The Newman
Correspondence, ii., 33.
[174] Keble was eleven years older than Froude, nine years older
than Newman.
[175] Founded by a bequest to the S.P.G. of Christopher Codrington,
1668-1710, the munificent Fellow of All Souls, Oxford; licensed by
Queen Anne; opened as a Grammar School in 1742; but not a
Collegiate institution for West Indian clergy, as originally intended,
until 1830.
[176] To ‘battel’ is a verb purely Oxonian by origin. Battels are a
man’s College accounts for supplies from kitchen and buttery, or else
60.
all College accounts,inclusive of board, lodging, tuition, rates, and
sundries.
[177] The Arians of the Fourth Century; their Doctrine, Temper, and
Conduct, chiefly as Exhibited in the Councils of the Church between
A.D. 325 and A.D. 384, by John Henry Newman, M.A., Fellow of Oriel
College. London: Rivingtons, 1833. The book is dedicated to Keble.
The review is in The British Magazine for January, 1834, v., 67. Mr. T.
Mozley thinks that The Arians is the landmark of Newman’s progress
from Low Church to High Church.
[178] There are two brief papers and a poem signed ‘C.’ in The
British Magazine Supplement, Dec. 31, 1833, in vol. iv. The matter
referred to is probably that dealing ‘Apostolically’ with Confirmation
and First Communion. The Editor has not been able to identify ‘C.’
[179] This still exists, the tallest, (a huge tree in Froude’s time,)
being over one hundred feet high.
[180] Vol. v., pp. 667 et seq.; vi., 380 et seq.
[181] ‘Some one, I think, asked in conversation at Rome [1833],
whether a certain interpretation of Scripture was Christian. It was
answered that Dr. Arnold took it; I interposed: “But is he a
Christian?” The subject went out of my head at once.’ Apologia pro
Vita Sua, 1890, p. 33.
[182] The Rev. George Dudley Ryder, second son of the Hon. and Rt.
Rev. Lord Bishop of Lichfield and Coventry. He married in June, 1834,
Sophia Lucy, youngest daughter of the Rev. J. Sargent, Rector of
Lavington, Sussex, sister of Mrs. Henry and of Mrs. Samuel
Wilberforce, and of Mrs. H. E. Manning.
[183] To ‘rat,’ a favourite verb with the two hide-bound purists who
used it daily, means obviously to forsake or abandon anything, as
rats skurry away from a sinking ship.
[184] The Rev. John Hothersal Pinder, M.A., Cambridge, first
Principal, from 1830 to 1835, subsequently first Principal of Wells
Theological College.
[185] North-east of Torquay.
[186] Newman, prompted by Isaac Williams, and following Thomas
Keble at Bisley, had, unknown to Froude, begun a month before to
read the two Church services daily in the chancel of S. Mary’s at
61.
Oxford: but adaily Eucharist was then unheard of in the Church of
England.
[187] Reminiscences, i., 217.
[188] Frederic Rogers, afterwards Lord Blachford, 1811-1889. He had
been Froude’s pupil, and also Newman’s, through a dazzlingly
brilliant University career. He occupied Froude’s rooms at Oriel on
staircase No. 3 for at least one term during his absence.
[189] In reference to Lib. iv., Carm. iii., 19-20: Ad Melpomenen.
[190] Vol. i., 369-372.
[191] J. H. N., Letters and Correspondence, i., 397-399.
[192] Essays Critical and Historical, by John Henry Cardinal Newman.
London: Longmans, 1891, ii., 375.
[193] Chronicle of Convocation, Sessions, July 3-6, 1887. The capitals
occur there, as here.
[194] J. H. N., Letters and Correspondence, i., 423.
[195] John Tucker, 1793-1873, Fellow of Corpus Christi College, and
at this time Dean; Vicar of West Hendred, Berkshire.
[196] The Note in the Remains, i., 405, calls attention to the
circumstance that R.H.F. was speaking of the Church system only;
i.e., the Establishment.
[197] Both Newman and Froude often employ this word in a sense
now quite obsolete. ‘The notion of diversion, entertainment, is
comparatively of recent introduction into the word. To amuse was to
cause to muse, to occupy or engage, and in this sense indeed to
divert, the thoughts and attention.’ Trench, Select Glossary, 1890, p.
7.
A perfect example of the bygone function of the word occurs in
Daniel’s Musophilus, where he condoles with ‘Sacred Religion,
mother of form and fear,’ in the days when she must
‘Sit poorly, without light, disrobed; no care
Of outward grace to amuse the poor devout.’
[198] Joram or jorum is a drinking-bowl.
[199] I.e., the work, then in progress, on The Life and Times of
Thomas à Becket.
62.
[200] The ChristianYear: Thoughts in Verse for the Sundays and
Holy-days Throughout the Year. First American Edition. Philadelphia:
Carey, Lea and Blanchard, MDCCCXXXIV.
[201] Frederick Oakeley, 1802-1880: Tutor and Lecturer of Balioll
College, Select Preacher to the University in 1831, Minister of
Margaret Chapel (on the site of All Saints, Margaret Street, London
W.) 1839-1845, and for the last thirty years of his life priest and
Canon of the Archdiocese of Westminster.
[202] The American editor, ‘G. D. W.’ [George Washington Doane].
Among the footnotes is the following: ‘The Editor is accountable,
throughout the volume, for the use of the Italic letter. He has
adopted that method of designating such lines as possess, in his
judgment, peculiar beauty.’ The preface is dated July 1, 1834. More
than twenty-five editions had been published in England at this time.
[203] With Froude always, though not with Newman, domesticity
spelled desertion of the Cause: to be married was, practically, to ‘rat.’
[204] The British Magazine for September, 1834, had announced the
marriage of H. W. Wilberforce, Esq., M.A., Oriel College, to Mary,
second daughter of the late Rev. J. Sargent, Rector of Lavington.
[205] Hurrell may well have known the state of poor Williams’ heart
in regard to Miss Caroline Champernowne of Dartington Hall: the
marriage, however, did not come off until 1842. Mr. Keble is not
mentioned in his worshipping disciple’s incriminating list, but he had
married Miss Charlotte Clark at Bisley on the tenth of the preceding
October. He was then in his forty-fourth year. The engagement was
of several years’ standing.
[206] Mr. Christie married in 1847.
[207] John Frederick Christie, M.A., Fellow of Oriel, received Deacon’s
Orders in the Cathedral at Oxford, on May 25, 1834, and Priest’s
Orders in the same place, on December 20, 1835.
[208] [Such as the necessity of holding by the union of Church and
State; of contenting himself with the English liturgical services, etc.
Note, Remains, i., 386.] The Editors mistook Hurrell’s word ‘one’ in
the text, printing it as ‘me.’
[209] To smug is to confiscate without ceremony.
63.
The Exeter FlyingPost, during the last week of the preceding May,
had announced the arrival of ‘the Bishop of Barbados and his family,
on a visit to Mrs. Coleridge’s father, the venerable Dean of
Winchester.’ The ‘thorough Z’ was in delicate health, and it forced
him, ultimately, to resign his charge. His only son, a young child in
Froude’s time at Barbados, Mr. Rennell Coleridge, has just died at
Salston, Ottery St. Mary (May, 1904).
[210] Isaac Williams was long believed to be hopelessly ill, but
recovered.
[211] The Rev. John Keble, Sr., Vicar of Coln St. Aldwyn, father and
sole educator of John and of Thomas Keble, up to the time of their
entering the University. He had inherited what he so splendidly
transmitted: the Carolian and Nonjuring tradition.
[212] He was by no means alone in indulging this pious sentiment.
On all sides, in 1835, ‘from Newman to Macaulay, from Cobbett to
Arnold, the Reformers were receiving scathing criticism.’ The Life-
Work of Cardinal Wiseman, in Problems and Persons, by Wilfrid
Ward. Longmans, 1903.
[213] Of Nov. 18, 1834. This is a homespun boyish acknowledgement
of Newman’s beautiful flight of words, straight to the heart of his
friend.
[214] Newman’s note some thirty years later, Letters and
Correspondence, ii., 7. ‘N.B.—Froude would not believe that I was in
earnest, as I was, in shrinking from the views which he boldly
followed out. I was against Transubstantiation.’
[215] In the standard modern edition, Pensées Fragments et Lettres
de Blaise Pascal … par M. Prosper Faugère, Paris, Leroux, 1897, the
passage occurs in Lettre V. (à Mademoiselle de Roannez), fin
d’Octobre, 1656, pp. 52-53.
[216] Probably in a letter. Mr. Christie was at this time devoting
himself to Ridley, whom he looked upon, Mr. Mozley tells us, as a
Saint and an Authority; his papers appeared later in The British
Critic.
[217] Sir William Hamilton’s celebrated (anonymous) article on
‘Admission of Dissenters to the Universities,’ Edinburgh Review, vol.
lx., pp. 202 et seq., for October, 1834, includes some telling
paragraphs on the Practical Theology (in reference to the
64.
countenancing of polygamy)and the Biblical Criticism (boldly
destructive) of Luther, Bucer, and Melancthon.
[218] First published as Tract 18: Thoughts on the Benefits of the
System of Fasting enjoined by our Church. It is dated Oxford, The
Feast of S. Thomas [1834], and signed E. B. P., being the first of the
Tracts to bear a signature, by way of disassociating its author from
the real Tractarians.
[219] The ‘Dartington one’ is, as we have seen, ‘Scripture a Record of
Human Sorrow’; the ‘Naples one’ is possibly ‘Religious Emotion,’ Nos.
xiv. and xxv. in Parochial Sermons, by John Henry Newman, M.A.,
Vicar of S. Mary the Virgin’s, Oxford, and Fellow of Oriel College.
London: Rivington, 1834.
[220] Did Froude mean to write ‘Gallican’? Saint Francis de Sales as a
Jansenist fills a new rôle.
[221] ‘The Rise and Fall of Gregory,’ chapter ix., in The Church of the
Fathers. Reprinted from The British Magazine, by Rivington, 1840, p.
146.
[222] Robert Isaac Wilberforce, as Vicar of East Farleigh, near
Maidstone, Kent, was out of Oxford life practically from 1831 to
1849.
[223] Choused means swindled, duped.
[224] Sic.
[225] Unidentified.
[226] He has forgotten, for the moment, his own illuminating word
spoken two years before: ‘Surely the promise “I am with you always”
means something?’ …
[227] The famous emendation of the thirteenth stanza in the
Gunpowder Treason hymn, which now reads in all editions of The
Christian Year,—
‘There present in the heart
As in the hands,’
was made after Keble’s death, by his executors, and in accordance
with his own request. The request was based upon that of ‘my dear
friend Hurrell Froude,’ over thirty years before. Keble had long held
out against the alteration, and for what he thought good cause, even
against Pusey, maintaining that ‘Not in the hands’ should be
65.
understood as ‘Not[only] in the hands.’ He had precedents and
analogies to lean upon. But when Bishop Jeune on February 9, 1866,
quoted the original lines in Convocation as against the Real Objective
Presence, the poet, then near his end, eagerly effected the change.
The ordinary reader may wonder whether a more astounding variant
be known to doctrinal statement.
[228] Both quotations are from one of the loveliest and tenderest
numbers of The Christian Year: that entitled ‘Holy Baptism,’ stanzas
v. and iii.
[229] ‘Someone’ was of course quoting from the Vulgate, the Song of
Solomon, iv., 11.
[230] The Rev. John Keble, Sr., died on Jan. 24, 1835, aged 89.
[231] Thus in the Newman Correspondence, ii., 94. In the Remains
the reading is ‘little to boast of.’
[232] Froude would not have heard of the famous contest for the
Speakership on Feb. 19, 1835, as he left the West Indies in March,
or early April. James Abercromby, Esq., of Edinburgh, obtained on
that day a majority of ten over Sir Charles Manners Sutton, who
thereupon retired in chagrin from public life, and was created
Viscount Canterbury.
[233] Letters of Frederic Lord Blachford, edited by George Eden
Marindin. London: Murray, 1896, p. 24.
[234] Reminiscences, ii., 14.
[235] ‘The Oxford Counter-Reformation,’ in Short Studies on Great
Subjects, 4th Series: 1883.
[236] Tract 63, afterwards published, with additions, in the Remains,
part i., ii., 383-423.
[237] (With dogma: not with disease!)
[238] The Ritualists, or Non-Natural Catholics. London: Shaw & Co.,
2nd edition, 1867, p. 73.
[239] In the Church of England, he means. Catholic altars were, and
are, always of stone, the custom of stone altars having been ruled as
obligatory at the Council of Epaon, A.D. 517. Dr. Pusey’s dismay will
be remembered at the adverse decision given on 31st January, 1845,
66.
against stone altar-slabs,as ‘revived’ in S. Sepulchre’s Church at
Cambridge. (Liddon’s Pusey, ii., 483.)
[240] La Renaissance Catholique en Angleterre, par Paul Thureau-
Dangin de l’Académie française. 1re Partie. Paris: Plon, 1899, p. 160.
[241] ‘Que se passa-t-il entre eux? Wiseman ne l’a jamais révélé.’
Idem, p. 104. M. Thureau-Dangin’s treatment of Froude throughout
is exquisite and just, though he contrives to miss a point or two.
[242] Newman warns us in the Preface to Loss and Gain against
actual identifications of his scenes and characters; and the warning
is just, because there is no warrant for the identifications. But
reading between the lines is particularly profitable with every page of
Newman’s, dictated by an almost unexampled deliberation and
sensitiveness. Reding (for one instance out of many), quitting his
beautiful and beloved Oxford, goes early in the morning to kiss the
willows along the Water-walks good-bye. It is almost impossible that
the man who thinks such a thing should not also be the man who
has done it.
[243] ‘Things,’ one is left to infer, which depended more or less on
the proximity of the Bodleian, and implied something in the way of
historical fiction.
[244] In vol. vii., 1835. The article for June, pp. 662-668, is Letter
No. xii. in The Church of the Fathers, and consists of a little essay on
S. Augustine, with excerpts from his treatises and private
correspondence on the subject of the religious life.
[245] The Statutes excluding married Fellows being still in force.
[246] Years after this was written, late in the seventies, he must have
passed near it, going to visit his brother-in-law, the Rev. Thomas
Mozley, at Plymtree.
[247] I.e., haranguing against ‘Romanism.’
[248] James Shergold Boone, 1799-1859, an Oxonian, then editor of
The British Critic.
[249] Copleston.
[250] The Rev. Charles Portates Golightly, 1807-1885, M.A., Oriel:
King of the ‘Peculiars.’
67.
[251] The Rev.Benjamin Harrison, 1808-1887, M.A., Christchurch,
afterwards Archdeacon of Maidstone and Canon of Canterbury.
[252] Probably Thomas Mozley, newly appointed Junior Treasurer of
Oriel.
[253] The Rev. Robert Francis Wilson, M.A., Oriel, was appointed Mr.
Keble’s Curate in 1835, and became his lifelong friend.
[254] In the review of Blanco White’s Observations on Heresy and
Orthodoxy.
[255] The Rev. John Richard Bogue, a Cambridge graduate, then, or
later, Curate of Cornworthy, towards Dartmouth.
[256] Life of Edward Bouverie Pusey, by Henry Parry Liddon, D.D.,
etc. London: Longmans, 1893, i., 359.
[257] John Mozley and Jemima Newman were married on April 28,
1836. Thomas Mozley’s first wife was Harriet Newman, married to
him in September of the same year. Not only the Mozleys of the
Tractarian group, but two of the Wilberforces (Samuel and Henry),
and the two Kebles, married sisters.
[258] A ‘prose,’ in this pleasant sense, seems always, with Oxford
men of that date, to mean a disquisition in the nature of a
monologue.
[259] Hurrell Froude’s first instalments of the articles embracing
translations of S. Thomas à Becket’s original letters (from the Vatican
Archives and other original sources) appeared in The British
Magazine for November, 1832, ii., 233-242, and had run on pretty
regularly ever since.
[260] In the theological sense.
[261] William Palmer (Vigornensis, as he was locally called to
distinguish him from his namesake at Magdalen College), and
Newman, in lesser measure, were responsible for this Tract,
numbered 15.
[262] During this month Blanco White had avowed himself a
Unitarian, and quitted Archbishop Whately’s house in Dublin.
[263] By accident, the same adjectives had instinctively occurred in a
postscript of Harriett Newman’s, written a month or two before.
68.
‘Who can refrainfrom tears at the thought of that bright and
beautiful Froude?’ she writes. ‘He is not expected to last long.’
[264] Coleridge’s Memoir of John Keble, p. 235.
[265] ‘Separation,’ Lyra Apostolica, Beeching’s edition, p. 17. See p.
331 of this book.
[266] Cholderton (Thomas Mozley’s Rectory), Oct. 3, 1839.—‘Keble’s
Preface to the Remains [Part II.], which awaited me here, is very
good, as far as I can judge; but somehow I want the faculty of
judging anything of Keble’s.’—John Henry Newman, Letters and
Correspondence to 1845. Longmans, 1890, ii., 213, 257.
[267] Lost.
[268] Newman. The anonymous review appeared in The Christian
Observer for July, 1837, pp. 460-479. The volume bears no number.
[269] Probably Henry Halford Vaughan of Christ Church, 1811-1885;
the distinguished jurist; elected Fellow of Oriel in 1835; afterwards
Regius Professor of Modern History.
[270] Renn Dickson Hampden, D.D., 1793-1868, received in October,
1836, his famous (Dean Burgon’s adjective was ‘scandalous’)
appointment by Lord Melbourne to the Regius Professorship of
Divinity in the University of Oxford, against the vehement and
prolonged opposition of both Low Church and High Church, to whom
‘Hampdenism’ meant nothing less than the negation of Christian
doctrine and the Catholic spirit. Hampden, if not ‘Hampdenism,’ was
to be greatly crippled by the Oxford Convocation of the following
May.
[271] The Rev. R. C. Fillingham’s wit, wasted on a winter Sunday
morning in the Pembroke Street Chapel, Oxford, may be worth
hoarding up. ‘The Martyrs died to protest against the ridiculous
doctrine of the Real Presence, and the man who preached that
doctrine from the pulpit was a traitor, and deserved to be drummed
out of the Church. (Applause)…. The new religion of the Church of
England was founded in 1833 … in order to save the endowments,
and was really a pecuniary dodge. The Martyrs’ Memorial protested
against it, and said this new thing was not the religion of the true
Church of England. The Memorial protested against dishonesty; it
stood as a protest against shams, etc., etc.’—The Oxford Times, Jan.
16, 1904.
69.
[272] The Rev.Edward Churton, 1800-1874, Rector of Crayke, the
Spanish scholar, biographer of Joshua Watson.
[273] Lives of Twelve Good Men, by John William Burgon, B.D., late
Dean of Chichester. London: Murray, 1891, p. 129.
[274] Afterwards seventh Earl of Carlisle.
[275] Correspondence, ii., 255.
[276] Letters of Frederic Lord Blachford, edited by George Eden
Marindin. Murray, 1896, p. 50.
[277] Life of William Ewart Gladstone, by John Morley. Macmillan,
1903, i., 306.
[278] Idem, p. 161.
[279] Remains, vol. ii., 229, 250, and elsewhere.
[280] Mr. Ruskin.
[281] Rose to Pusey, in Burgon’s Lives of Twelve Good Men, p. 125.
[282] ‘A More Excellent Way,’ in The Faith of the Millions. First Series.
By George Tyrrell, S. J. Longmans, 1901, p. 5.
[283] Sir James Stephen, ‘The Evangelical Succession,’ in Essays in
Ecclesiastical Biography. London: Longmans, 1860, 4th edition, i.,
462.
[284] Quoted in The Monthly Repository for 1835, discovered and
reproduced in Mr. Bertram Dobell’s Sidelights on Charles Lamb, 1903,
p. 325.
[285] Life and Letters of Ambrose Phillipps de Lisle, i., 199. Compare
the Rev. Spencer Jones’ remarkable article, ‘Who Makes the
Division?’ in The Lamp for April or May, 1904. ‘The terminus ad quem
of the Oxford Movement, by logical and divine necessity, seems to us
to be the return of the Anglican Church to the supreme authority of
the Holy See. To it we must come, if we desire to possess a
sanctuary once more.’
[286] Canon Smith, Rector of S. Peter’s Catholic Church at Marlow,
once the Anglican Rector of Leadenham, died, aged 89, on October
24, 1903, while the first sheets of this book were passing through
the press.
70.
[287] It isthe saying of a contemporary wit: ‘Did you ever see a
clever Anglican who did not worry over his Church? and did you ever
see a clever Roman who did?’
[288] See p. 148.
[289] Reminiscences, i., 441.
[290] Life and Letters of Walter Farquhar Hook, D.D., F.R.S., by his
Son-in-Law, W. R. W. Stephens. Bentley, 1878, ii., 103.
[291] L’Anglo-Catholicisme, par le Père Ragey. Paris: Lecoffre [1897],
pp. 4, 7.
[292] Mr. Simcox in The Academy, May 22, 1891, xxxix., 481.
[293] The physical resemblance between R. H. F.’s child-portrait and il
buon Pippo, becomes none the less noteworthy when one turns
towards what Newman wrote from Rome to his sister about S. Philip
Neri, on January 26, 1847. ‘This great Saint reminds me in so many
ways of Keble, that I can fancy what Keble would have been … in
another place and age; he was formed on the same type of extreme
hatred of humbug, playfulness, nay, oddity, tender love of others,
and severity.’ John Henry Newman, Letters and Correspondence to
1845, ii., 424.
71.
H U RR E L L F R O U D E
I I
S O M E R E P R I N T E D C O M M E N T S
O N H I M A N D O N H I S
R E L A T I O N
T O T H E O X F O R D M O V E M E N T
72.
CONTENTS
PART II.—COMMENTS
PAGE
From ‘TheOxford Movement,’ 1833-1845, by R. W. Church 235
From ‘Apologia pro Vita Sua,’ by John Henry Newman 259
From ‘The Cherwell Water-Lily and other Poems,’ by Frederick
William Faber 263
From ‘Essays in Ecclesiastical Biography,’ by the Right Hon. Sir
James Stephen 263
From ‘A Memoir of the Rev. John Keble,’ by the Right Hon. Sir J.
T. Coleridge 276
From ‘Essays Historical and Theological,’ by J. B. Mozley 278
From ‘Memoir of Joshua Watson,’ edited by Edward Churton 281
From ‘William George Ward and the Oxford Movement,’ by Wilfrid
Ward 282
From ‘A Narrative of Events connected with the Publication of the
Tracts for the Times,’ by William Palmer [of Worcester Coll.] 287
From ‘Oxford High Anglicanism and its chief Leaders,’ by J. H.
Rigg 291
From ‘Historical Notes on the Tractarian Movement,’ by Frederick
Oakeley 299
From ‘The British Critic’ for Jan., 1838. (A review of the
Remains, Part I., by Frederic Rogers.) 306
73.
From ‘The Autobiographyof Isaac Williams,’ edited by George
Prevost 320
From ‘Thoughts in Past Years,’ by Isaac Williams 326
From ‘Cardinal Newman,’ by Richard H. Hutton 329
From ‘The Anglican Revival,’ by J. H. Overton 334
From ‘Essays on Various Subjects,’ by Nicholas Wiseman 338
From ‘The Anglican Career of Cardinal Newman,’ by Edwin A.
Abbott 344
From ‘Oriel College,’ by David Watson Rannie 356
From ‘Short Studies on Great Subjects,’ by James Anthony Froude 358
Controversy from ‘The Contemporary Review’ and ‘The Nineteenth
Century’ between E. A. Freeman and J. A. Froude 363
From ‘The Remains of Richard Hurrell Froude’ [edited by John
Keble and John Henry Newman], 1838 367
Idem, 1839 374
From ‘Reminiscences chiefly of Oriel College and the Oxford
Movement,’ by T. Mozley 391
From ‘The British Critic’ for April 1840. (A review of the
Remains, Part II., by T. Mozley) 398
From ‘Lyra Apostolica,’ edited by H. C. Beeching, with an
Introduction by H. S. Holland 402
From ‘Newman,’ by William Barry 405
Excerpts from ‘Memoirs,’ by Mark Pattison; the ‘Life of Samuel
Wilberforce,’ by his Son; the ‘Life and Correspondence of the
late Robert Southey,’ by his Son; ‘A Key to the Popery of
Oxford,’ by Peter Maurice; ‘John Henry Newman, Letters and
Correspondences,’ edited by Anne Mozley; and ‘Catholicism,
Roman and Anglican,’ by A. M. Fairbairn
406-
408
74.
HURRELL FROUDE
II
SOME REPRINTEDCOMMENTS ON HIM AND ON HIS RELATION
TO THE OXFORD MOVEMENT
From ‘The Oxford Movement: Twelve Years, 1833-1845,’ By R. W.
Church, M.A., D.C.L., sometime Dean of St. Paul’s, and Fellow of
Oriel College, Oxford. London: Macmillan & Co., 1891.
[By the kind permission of Miss Church and of Messrs. Macmillan & Co.]
‘What was it that turned [Keble] by degrees into so prominent
and so influential a person? It was the result of the action of his
convictions and ideas, and still more of his character, on the
energetic and fearless mind of a pupil and disciple, Richard Hurrell
Froude. Froude was Keble’s pupil at Oriel, and when Keble left Oriel
for his curacy at the beginning of the Long Vacation of 1823, he took
Froude with him to read for his degree. He took with him ultimately
two other pupils, Robert Wilberforce and Isaac Williams of Trinity.
One of them, Isaac Williams, has left some reminiscences of the
time, and of the terms on which the young men were with their
tutor, then one of the most famous men at Oxford. They were terms
of the utmost freedom. “Master is the greatest boy of them all,” was
the judgment of the rustic who was gardener, groom, and parish
clerk to Mr. Keble. Froude’s was a keen logical mind, not easily
75.
satisfied, contemptuous ofcompromises and evasions, and disposed
on occasion to be mischievous and aggressive; and with Keble, as
with anybody else, he was ready to dispute and try every form of
dialectical experiment. But he was open to higher influences than
those of logic, and in Keble he saw what subdued and won him to
boundless veneration and affection. Keble won the love of the whole
little society; but in Froude he had gained a disciple who was to be
the mouthpiece and champion of his ideas, and who was to react on
himself and carry him forward to larger enterprises and bolder
resolutions than by himself he would have thought of. Froude took in
from Keble all he had to communicate: principles, convictions, moral
rules and standards of life, hopes, fears, antipathies. And his keenly-
tempered intellect, and his determination and high courage, gave a
point and an impulse of their own to Keble’s views and purposes. As
things came to look darker, and dangers seemed more serious to the
Church, its faith or its rights, the interchange of thought between
master and disciple, in talk and in letter, pointed more and more to
the coming necessity of action; and Froude at least had no
objections to the business of an agitator. But all this was very
gradual; things did not yet go beyond discussion; ideas, views,
arguments were examined and compared; and Froude, with all his
dash, felt as Keble felt, that he had much to learn about himself, as
well as about books and things. In his respect for antiquity, in his
dislike of the novelties which were invading Church rules and
sentiments, as well as its Creeds, in his jealousy of the State, as well
as in his seriousness of self-discipline, he accepted Keble’s guidance
and influence more and more; and from Keble he had more than one
lesson of self-distrust, more than one warning against the
temptations of intellect. “Froude told me many years after,” writes
one of his friends, “that Keble once, before parting with him, seemed
to have something on his mind which he wished to say, but shrank
from saying, while waiting, I think, for a coach. At last he said, just
before parting, ‘Froude, you thought Law’s Serious Call was a clever
book; it seemed to me as if you had said the Day of Judgement will
be a pretty sight.’ This speech, Froude told me, had a great effect on
his after life.”[294]
76.
‘At Easter, 1826,Froude was elected Fellow of Oriel. He came
back to Oxford, charged with Keble’s thoughts and feelings, and
from his more eager and impatient temper, more on the look-out for
ways of giving them effect. The next year he became Tutor, and he
held the tutorship till 1830. But he found at Oriel a colleague, a little
his senior in age and standing, of whom Froude and his friends as
yet knew little except that he was a man of great ability, that he had
been a favourite of Whately’s, and that in a loose and rough way he
was counted among the few Liberals and Evangelicals in Oxford.
This was Mr. Newman. Keble had been shy of him, and Froude would
at first judge him by Keble’s standard. But Newman was just at this
time “moving,” as he expresses it, “out of the shadow of Liberalism.”
Living not apart like Keble, but in the same College, and meeting
every day, Froude and Newman could not but be either strongly and
permanently repelled, or strongly attracted. They were attracted:
attracted with a force which at last united them in the deepest and
most unreserved friendship. Of the steps of this great change in the
mind and fortunes of each of them we have no record: intimacies of
this kind grow in College out of unnoticed and unremembered talks,
agreeing or differing, out of unconscious disclosures of temper and
purpose, out of walks and rides and quiet breakfasts and Common-
Room arguments, out of admirations and dislikes, out of letters and
criticisms and questions; and nobody can tell afterwards how they
have come about. The change was gradual and deliberate. Froude’s
friends in Gloucestershire, the Keble family, had their misgivings
about Newman’s supposed Liberalism; they did not much want to
have to do with him. His subtle and speculative temper did not
always square with Froude’s theology. “N. is a fellow that I like more,
the more I think of him,” Froude wrote in 1828; “only I would give a
few odd pence if he were not a heretic.”[295] But Froude, who saw
him every day, and was soon associated with him in the tutorship,
found a spirit more akin to his own in depth and freedom and
daring, than he had yet encountered. And Froude found Newman
just in that maturing state of religious opinion in which a powerful
mind like Froude’s would be likely to act decisively. Each acted on
the other. Froude represented Keble’s ideas, Keble’s enthusiasm.
77.
Newman gave shape,foundation, consistency, elevation to the
Anglican theology, when he accepted it, which Froude had learned
from Keble. “I knew him first,” we read in the Apologia, “in 1826,
and was in the closest and most affectionate friendship with him
from about 1829 till his death in 1836.”[296]
But this was not all.
Through Froude, Newman came to know and to be intimate with
Keble; and a sort of camaraderie arose of very independent and
outspoken people, who acknowledged Keble as their master and
counsellor.
‘“The true and primary author of it” (the Tractarian Movement),
we read in the Apologia, “as is usual with great motive powers, was
out of sight…. Need I say that I am speaking of John Keble?” The
statement is strictly true. Froude never would have been the man he
was but for his daily and hourly intercourse with Keble; and Froude
brought to bear upon Newman’s mind, at a critical period of its
development, Keble’s ideas and feelings about religion and the
Church, Keble’s reality of thought and purpose, Keble’s transparent
and saintly simplicity. And Froude, as we know from a well-known
saying of his,[297] brought Keble and Newman to understand one
another, when the elder man was shy and suspicious of the younger,
and the younger, though full of veneration for the elder, was hardly
yet in full sympathy with what was most characteristic and most
cherished in the elder’s religious convictions. Keble attracted and
moulded Froude: he impressed Froude with his strong
Churchmanship, his severity and reality of life, his poetry, and high
standard of scholarly excellence. Froude learned from him to be anti-
Erastian, anti-Methodistical, anti-sentimental, and as strong in his
hatred of the world, as contemptuous of popular approval, as any
Methodist. Yet all this might merely have made a strong impression,
or formed one more marked school of doctrine, without the fierce
energy which received it and which it inspired. But Froude, in
accepting Keble’s ideas, resolved to make them active, public,
aggressive; and he found in Newman a colleague whose bold
originality responded to his own. Together they worked as Tutors;
together they worked when their tutorships came to an end;
78.
together they workedwhen thrown into companionship in their
Mediterranean voyage, in the winter of 1832 and the spring of 1833.
They came back full of aspirations and anxieties which spurred them
on; their thoughts had broken out in papers sent home from time to
time to Rose’s British Magazine (“Home Thoughts Abroad”) and the
Lyra Apostolica. Then came the meeting at Hadleigh, and the
beginning of the Tracts. Keble had given the inspiration, Froude had
given the impulse; then Newman took up the work, and the impulse
henceforward, and the direction, were his.
‘Doubtless, many thought and felt like them about the perils
which beset the Church and religion. Loyalty to the Church, belief in
her divine mission, allegiance to her authority, readiness to do battle
for her claims, were anything but extinct in her ministers and laity.
The elements were all about of sound and devoted Churchmanship.
Higher ideas of the Church than the popular and political notion of it,
higher conceptions of Christian doctrine than those of the ordinary
Evangelical theology—echoes of the meditations of a remarkable
Irishman, Mr. Alexander Knox—had in many quarters attracted
attention in the works and sermons of his disciple, Bishop Jebb,
though it was not till the Movement had taken shape that their full
significance was realised. Others besides Keble and Froude and
Newman were seriously considering what could best be done to
arrest the current which was running strong against the Church, and
discussing schemes of resistance and defence. Others were stirring
up themselves and their brethren to meet the new emergencies, to
respond to the new call. Some of these were in communication with
the Oriel men, and ultimately took part with them in organising
vigorous measures. But it was not till Mr. Newman made up his mind
to force on the public mind, in a way which could not be evaded, the
great article of the Creed, “I believe one Catholic and Apostolic
Church,” that the Movement began. And for the first part of its
course, it was concentrated at Oxford. It was the direct result of the
searchings of heart and the communings for seven years, from 1826
to 1833, of the three men who have been the subject of this chapter.
79.
* * ** *
‘Hurrell Froude[298] soon passed away before the brunt of the
fighting came. His name is associated with Mr. Newman and Mr.
Keble, but it is little more than a name to those who now talk of the
origin of the Movement. Yet all who remember him agree in
assigning to him an importance as great as that of any, in that little
knot of men whose thoughts and whose courage gave birth to it….
He was early cut off from direct and personal action on the course
which things took. But it would be a great mistake to suppose that
his influence on the line taken, and on the minds of others, was
inconsiderable. It would be more true to say that, with one
exception, no one was more responsible for the impulse which led to
the Movement; no one had more to do with shaping its distinct aims
and its moral spirit and character, in its first stage; no one was more
daring and more clear, as far as he saw, in what he was prepared
for. There was no one to whom his friends so much looked up with
admiration and enthusiasm. There was no “wasted shade”[299]
in
Hurrell Froude’s disabled, prematurely shortened life.
‘Like Henry Martyn, he was made by strong and even merciless
self-discipline over a strong and for a long time refractory nature. He
was a man of great gifts, with much that was most attractive and
noble; but joined with this there was originally in his character a vein
of perversity and mischief, always in danger of breaking out, and
with which he kept up a long and painful struggle. His inmost
thought and knowledge of himself have been laid bare in the papers
which his friends published after his death. He was in the habit of
probing his motives to the bottom, and of recording without mercy
what he thought his self-deceits and affectations. The religious world
of the day made merry over his methods of self-discipline; but
whatever may be said of them, (and such things are not easy to
judge of), one thing is manifest, that they were true and sincere
efforts to conquer what he thought evil in himself, to keep himself in
order, to bring his inmost self into subjection to the Law and Will of
God. The self-chastening which his private papers show, is no
80.
passion or valuefor asceticism, but a purely moral effort after self-
command and honesty of character; and what makes the struggle so
touching is its perfect reality and truth. He “turned his thoughts on
that desolate wilderness, his own conscience, and said what he saw
there.”[300] A man who has had a good deal to conquer in himself,
and has gone a good way to conquer it, is not apt to be indulgent to
self-deceit or indolence, or even weakness. The basis of Froude’s
character was a demand which would not be put off for what was
real and thorough; an implacable scorn and hatred for what he
counted shams and pretences. “His highest ambition,” he used to
say, “was to be a humdrum.”[301]
The intellectual and the moral parts
of his character were of a piece. The tricks and flimsinesses of a bad
argument provoked him as much as the imposture and “flash” of
insincere sentiment and fine talking; he might be conscious of
“flash” in himself and his friends, and he would admit it
unequivocally; but it was as unbearable to him to pretend not to see
a fallacy as soon as it was detected, as it would have been to him to
arrive at the right answer of a sum or a problem by tampering with
the processes. Such a man, with strong affections and keen
perception of all forms of beauty, and with the deepest desire to be
reverent towards all that had a right to reverence, would find himself
in the most irritating state of opposition and impatience with much
that passed as religion round him. Principles not attempted to be
understood and carried into practice; smooth self-complacency
among those who looked down on a blind and unspiritual world; the
continual provocation of worthless reasoning and ignorant
platitudes; the dull unconscious stupidity of people who could not
see that the times were critical, that Truth had to be defended, and
that it was no easy or light-hearted business to defend it;—threw
him into an habitual attitude of defiance, and half-amused, half-
earnest contradiction, which made him feared by loose reasoners
and pretentious talkers, and even by quiet easy-going friends, who
unexpectedly found themselves led on blindfold, with the utmost
gravity, into traps and absurdities, by the wiles of his mischievous
dialectic. This was the outside look of his relentless earnestness.
People who did not like him or his views, and who, perhaps, had