100% found this document useful (1 vote)
31 views

Instant Access to Python High Performance Programming Boost the performance of your Python programs using advanced techniques 1st Edition Gabriele Lanaro ebook Full Chapters

Lanaro

Uploaded by

yelumaakyem
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
31 views

Instant Access to Python High Performance Programming Boost the performance of your Python programs using advanced techniques 1st Edition Gabriele Lanaro ebook Full Chapters

Lanaro

Uploaded by

yelumaakyem
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 61

Download Full ebookname - Read Now at ebookname.

com

Python High Performance Programming Boost the


performance of your Python programs using advanced
techniques 1st Edition Gabriele Lanaro

https://ebookname.com/product/python-high-performance-
programming-boost-the-performance-of-your-python-programs-
using-advanced-techniques-1st-edition-gabriele-lanaro/

OR CLICK BUTTON

DOWLOAD EBOOK

Discover More Ebook - Explore Now at ebookname.com


Instant digital products (PDF, ePub, MOBI) available
Download now and explore formats that suit you...

Python High Performance 2nd Edition Gabriele Lanaro

https://ebookname.com/product/python-high-performance-2nd-edition-
gabriele-lanaro/

ebookname.com

Fundamentals of Python First Programs 1st Edition Kenneth


A. Lambert

https://ebookname.com/product/fundamentals-of-python-first-
programs-1st-edition-kenneth-a-lambert/

ebookname.com

Beginning Python Using Python 2 6 and Python 3 1 Wrox


Programmer to Programmer James Payne

https://ebookname.com/product/beginning-python-using-python-2-6-and-
python-3-1-wrox-programmer-to-programmer-james-payne/

ebookname.com

JSTL Practical Guide for JSP Programmers 1st Edition Sue


Spielman

https://ebookname.com/product/jstl-practical-guide-for-jsp-
programmers-1st-edition-sue-spielman/

ebookname.com
Water Recycling and Resource Recovery in Industry Analysis
Technologies and Implementation 1st Edition P. Lens

https://ebookname.com/product/water-recycling-and-resource-recovery-
in-industry-analysis-technologies-and-implementation-1st-edition-p-
lens/
ebookname.com

WSO Basic Science Concepts and Application Principles and


Practices of Water Supply Operations 4th Edition Nicholas
G. Pizzi
https://ebookname.com/product/wso-basic-science-concepts-and-
application-principles-and-practices-of-water-supply-operations-4th-
edition-nicholas-g-pizzi/
ebookname.com

Serotonin Receptor Technologies 1st Edition Wolfgang


Blenau

https://ebookname.com/product/serotonin-receptor-technologies-1st-
edition-wolfgang-blenau/

ebookname.com

Oxide Scale Behavior in High Temperature Metal Processing


1st Edition Michal Krzyzanowski

https://ebookname.com/product/oxide-scale-behavior-in-high-
temperature-metal-processing-1st-edition-michal-krzyzanowski/

ebookname.com

Financial accounting and reporting 12th ed Edition Barry


Elliott

https://ebookname.com/product/financial-accounting-and-reporting-12th-
ed-edition-barry-elliott/

ebookname.com
Repainting the Little Red Schoolhouse A History of Eastern
German Education 1945 1995 First Edition. Edition John
Rodden
https://ebookname.com/product/repainting-the-little-red-schoolhouse-a-
history-of-eastern-german-education-1945-1995-first-edition-edition-
john-rodden/
ebookname.com
Python High Performance
Programming

Boost the performance of your Python programs


using advanced techniques

Gabriele Lanaro

BIRMINGHAM - MUMBAI
Python High Performance Programming

Copyright © 2013 Packt Publishing

All rights reserved. No part of this book may be reproduced, stored in a retrieval
system, or transmitted in any form or by any means, without the prior written
permission of the publisher, except in the case of brief quotations embedded in
critical articles or reviews.

Every effort has been made in the preparation of this book to ensure the accuracy
of the information presented. However, the information contained in this book is
sold without warranty, either express or implied. Neither the author, nor Packt
Publishing, and its dealers and distributors will be held liable for any damages
caused or alleged to be caused directly or indirectly by this book.

Packt Publishing has endeavored to provide trademark information about all of the
companies and products mentioned in this book by the appropriate use of capitals.
However, Packt Publishing cannot guarantee the accuracy of this information.

First published: December 2013

Production Reference: 1171213

Published by Packt Publishing Ltd.


Livery Place
35 Livery Street
Birmingham B3 2PB, UK.

ISBN 978-1-78328-845-8

www.packtpub.com

Cover Image by Gagandeep Sharma ([email protected])


Credits

Author Project Coordinator


Gabriele Lanaro Sherin Padayatty

Reviewers Proofreader
Daniel Arbuckle Linda Morris
Mike Driscoll
Albert Lukaszewski Indexer
Rekha Nair

Acquisition Editors
Owen Roberts Production Coordinators
Pooja Chiplunkar
Harsha Bharwani
Manu Joseph

Commissioning Editor
Shaon Basu Cover Work
Pooja Chiplunkar

Technical Editors
Akashdeep Kundu
Faisal Siddiqui
About the Author

Gabriele Lanaro is a PhD student in Chemistry at the University of British


Columbia, in the field of Molecular Simulation. He writes high performance
Python code to analyze chemical systems in large-scale simulations. He is the
creator of Chemlab—a high performance visualization software in Python—and
emacs-for-python—a collection of emacs extensions that facilitate working with
Python code in the emacs text editor. This book builds on his experience in
writing scientific Python code for his research and personal projects.

I want to thank my parents for their huge, unconditional love and


support. My gratitude cannot be expressed by words but I hope
that I made them proud of me with this project.

I would also thank the Python community for producing and


maintaining a massive quantity of high-quality resources made
available for free. Their extraordinary supportive and compassionate
attitude really fed my passion for this amazing technology.

A special thanks goes to Hessam Mehr for reviewing my drafts,


testing the code and providing extremely valuable feedback. I would
also like to thank my roommate Kaveh for being such an awesome
friend and Na for bringing me chocolate bars during rough times.
About the Reviewers

Dr. Daniel Arbuckle is a published researcher in the fields of robotics and


nanotechnology, as well as a professional Python programmer. He is the author
of Python Testing: Beginner's Guide from Packt Publishing and one of the authors
of Morphogenetic Engineering from Springer-Verlag.

Mike Driscoll has been programming in Python since Spring 2006. He enjoys
writing about Python on his blog at http://www.blog.pythonlibrary.org/.
Mike also occasionally writes for the Python Software Foundation, i-Programmer,
and Developer Zone. He enjoys photography and reading a good book. Mike has
also been a technical reviewer for Python 3 Object Oriented Programming, Python
2.6 Graphics Cookbook, and Tkinter GUI Application Development Hotshot.

I would like to thank my beautiful wife, Evangeline, for always


supporting me. I would also like to thank friends and family for
all that they do to help me. And I would like to thank Jesus Christ
for saving me.

Albert Lukaszewski is a software consultant and the author of MySQL for


Python. He has programmed computers for nearly 30 years. He specializes in
high-performance Python implementations of network and database services.
He has designed and developed Python solutions for a wide array of industries
including media, mobile, publishing, and cinema. He lives with his family in
southeast Scotland.
www.PacktPub.com

Support files, eBooks, discount offers and more


You might want to visit www.PacktPub.com for support files and downloads related
to your book.

Did you know that Packt offers eBook versions of every book published, with PDF
and ePub files available? You can upgrade to the eBook version at www.PacktPub.
com and as a print book customer, you are entitled to a discount on the eBook copy.
Get in touch with us at [email protected] for more details.

At www.PacktPub.com, you can also read a collection of free technical articles, sign
up for a range of free newsletters and receive exclusive discounts and offers on Packt
books and eBooks.
TM

http://PacktLib.PacktPub.com

Do you need instant solutions to your IT questions? PacktLib is Packt's online


digital book library. Here, you can access, read and search across Packt's entire
library of books.

Why Subscribe?
• Fully searchable across every book published by Packt
• Copy and paste, print and bookmark content
• On demand and accessible via web browser

Free Access for Packt account holders


If you have an account with Packt at www.PacktPub.com, you can use this to access
PacktLib today and view nine entirely free books. Simply use your login credentials
for immediate access.
Table of Contents
Preface 1
Chapter 1: Benchmarking and Profiling 7
Designing your application 7
Writing tests and benchmarks 13
Timing your benchmark 15
Finding bottlenecks with cProfile 17
Profile line by line with line_profiler 21
Optimizing our code 23
The dis module 25
Profiling memory usage with memory_profiler 26
Performance tuning tips for pure Python code 28
Summary 30
Chapter 2: Fast Array Operations with NumPy 31
Getting started with NumPy 31
Creating arrays 32
Accessing arrays 34
Broadcasting 37
Mathematical operations 40
Calculating the Norm 41
Rewriting the particle simulator in NumPy 41
Reaching optimal performance with numexpr 45
Summary 47
Table of Contents

Chapter 3: C Performance with Cython 49


Compiling Cython extensions 49
Adding static types 52
Variables 52
Functions 54
Classes 55
Sharing declarations 56
Working with arrays 58
C arrays and pointers 58
NumPy arrays 60
Typed memoryviews 61
Particle simulator in Cython 63
Profiling Cython 67
Summary 70
Chapter 4: Parallel Processing 71
Introduction to parallel programming 72
The multiprocessing module 74
The Process and Pool classes 74
Monte Carlo approximation of pi 77
Synchronization and locks 80
IPython parallel 82
Direct interface 83
Task-based interface 87
Parallel Cython with OpenMP 88
Summary 91
Index 93

[ ii ]
Preface
Python is a programming language renowned for its simplicity, elegance, and
the support of an outstanding community. Thanks to the impressive amount
of high-quality third-party libraries, Python is used in many domains.

Low-level languages such as C, C++, and Fortran are usually preferred in


performance-critical applications. Programs written in those languages
perform extremely well, but are hard to write and maintain.

Python is an easier language to deal with and it can be used to quickly write
complex applications. Thanks to its tight integration with C, Python is able to
avoid the performance drop associated with dynamic languages. You can use
blazing fast C extensions for performance-critical code and retain all the
convenience of Python for the rest of your application.

In this book, you will learn, in a step-by-step method how to find and speedup
the slow parts of your programs using basic and advanced techniques.

The style of the book is practical; every concept is explained and illustrated with
examples. This book also addresses common mistakes and teaches how to avoid
them. The tools used in this book are quite popular and battle-tested; you can be
sure that they will stay relevant and well-supported in the future.

This book starts from the basics and builds on them, therefore, I suggest you
to move through the chapters in order.

And don't forget to have fun!


Preface

What this book covers


Chapter 1, Benchmarking and Profiling shows you how to find the parts of your
program that need optimization. We will use tools for different use cases and
explain how to analyze and interpret profiling statistics.

Chapter 2, Fast Array Operations with NumPy is a guide to the NumPy package.
NumPy is a framework for array calculations in Python. It comes with a clean
and concise API, and efficient array operations.

Chapter 3, C Performance with Cython is a tutorial on Cython: a language that acts


as a bridge between Python and C. Cython can be used to write code using a
superset of the Python syntax and to compile it to obtain efficient C extensions.

Chapter 4, Parallel Processing is an introduction to parallel programming. In


this chapter, you will learn how parallel programming is different from serial
programming and how to parallelize simple problems. We will also explain
how to use multiprocessing, IPython.parallel and cython.parallel to
write code for multiple cores.

What you need for this book


This book requires a Python installation. The examples work for both Python 2.7
and Python 3.3 unless indicated otherwise.

In this book, we will make use of some popular Python packages:

• NumPy (Version 1.7.1 or later): This package is downloadable from the


official website (http://www.scipy.org/scipylib/download.html)
and available in most of the Linux distributions
• Cython (Version 0.19.1 or later): Installation instructions are present in the
official website (http://docs.cython.org/src/quickstart/install.
html); notice that you also need a C compiler, such as GCC (GNU Compiler
Collection), to compile your C extensions
• IPython (Version 0.13.2 or later): Installation instructions are present in the
official website (http://ipython.org/install.html)

The book was written and tested on Ubuntu 13.10. The examples will likely run on
Mac OS X with little or no changes.

My suggestion for Windows users is to install the Anaconda Python distribution


(https://store.continuum.io/cshop/anaconda/), which comes with a complete
environment suitable for scientific programming.

[2]
Preface

A convenient alternative is to use the free service wakari.io: a cloud-based Linux


and Python environment that includes the required packages with their tools and
utilities. No setup is required.

In Chapter 1, Benchmarking and Profiling, we will use KCachegrind (http://


sourceforge.net/projects/kcachegrind/), which is available for Linux.
KCachegrind has also a port for Windows—QcacheGrind—which is also installable
from source on Mac OS X.

Who this book is for


This book is for intermediate to advanced Python programmers who develop
performance-critical applications. As most of the examples are taken from scientific
applications, the book is a perfect match for scientists and engineers looking to
speed up their numerical codes.

However, the scope of this book is broad and the concepts can be applied to any
domain. Since the book addresses both basic and advanced topics, it contains
useful information for programmers with different Python proficiency levels.

Conventions
In this book, you will find a number of styles of text that distinguish between
different kinds of information. Here are some examples of these styles, and an
explanation of their meaning.

Code words in text, database table names, folder names, filenames, file extensions,
pathnames, dummy URLs, user input, and Twitter handles are shown as follows:
"The plot function included in matplotlib can display our particles as points
on a Cartesian grid and the FuncAnimation class can animate the evolution of
our particles over time."

A block of code is set as follows:


from matplotlib import pyplot as plt
from matplotlib import animation

def visualize(simulator):

X = [p.x for p in simulator.particles]


Y = [p.y for p in simulator.particles]

[3]
Preface

When we wish to draw your attention to a particular part of a code block, the
relevant lines or items are set in bold:
In [1]: import purepy
In [2]: %timeit purepy.loop()
100 loops, best of 3: 8.26 ms per loop
In [3]: %timeit purepy.comprehension()
100 loops, best of 3: 5.39 ms per loop
In [4]: %timeit purepy.generator()
100 loops, best of 3: 5.07 ms per loop

Any command-line input or output is written as follows:


$ time python simul.py # Performance Tuned
real 0m0.756s
user 0m0.714s
sys 0m0.036s

New terms and important words are shown in bold. Words that you see on the
screen, in menus or dialog boxes, for example, appear in the text like this: "You
can navigate to the Call Graph or the Caller Map tabs by double-clicking on the
rectangles."

Warnings or important notes appear in a box like this.

Tips and tricks appear like this.

Reader feedback
Feedback from our readers is always welcome. Let us know what you think about
this book—what you liked or may have disliked. Reader feedback is important for
us to develop titles that you really get the most out of.

To send us general feedback, simply send an e-mail to [email protected],


and mention the book title via the subject of your message.

If there is a topic that you have expertise in and you are interested in either writing
or contributing to a book, see our author guide on www.packtpub.com/authors.

[4]
Preface

Customer support
Now that you are the proud owner of a Packt book, we have a number of things to
help you to get the most from your purchase.

Downloading the example code


You can download the example code files for all Packt books you have purchased
from your account at http://www.packtpub.com. If you purchased this book
elsewhere, you can visit http://www.packtpub.com/support and register to
have the files e-mailed directly to you.

Errata
Although we have taken every care to ensure the accuracy of our content, mistakes
do happen. If you find a mistake in one of our books—maybe a mistake in the text or
the code—we would be grateful if you would report this to us. By doing so, you can
save other readers from frustration and help us improve subsequent versions of this
book. If you find any errata, please report them by visiting http://www.packtpub.
com/submit-errata, selecting your book, clicking on the errata submission form link,
and entering the details of your errata. Once your errata are verified, your submission
will be accepted and the errata will be uploaded on our website, or added to any list of
existing errata, under the Errata section of that title. Any existing errata can be viewed
by selecting your title from http://www.packtpub.com/support.

Piracy
Piracy of copyright material on the Internet is an ongoing problem across all media.
At Packt, we take the protection of our copyright and licenses very seriously. If you
come across any illegal copies of our works, in any form, on the Internet, please
provide us with the location address or website name immediately so that we can
pursue a remedy.

Please contact us at [email protected] with a link to the suspected


pirated material.

We appreciate your help in protecting our authors, and our ability to bring you
valuable content.

Questions
You can contact us at [email protected] if you are having a problem with
any aspect of the book, and we will do our best to address it.

[5]
Benchmarking and Profiling
Recognizing the slow parts of your program is the single most important task when it
comes to speeding up your code. In most cases, the bottlenecks account for a very small
fraction of the program. By specifically addressing those critical spots you can focus on
the parts that need improvement without wasting time in micro-optimizations.

Profiling is the technique that allows us to pinpoint the bottlenecks. A profiler


is a program that runs the code and observes how long each function takes to
run, detecting the slow parts of the program. Python provides several tools to
help us find those bottlenecks and navigate the performance metrics. In this
chapter, we will learn how to use the standard cProfile module, line_profiler
and memory_profiler. We will also learn how to interpret the profiling results
using the program KCachegrind.

You may also want to assess the total execution time of your program and see how
it is affected by your changes. We will learn how to write benchmarks and how to
accurately time your programs.

Designing your application


When you are designing a performance-intensive program, the very first step is to
write your code without having optimization in mind; quoting Donald Knuth:

Premature optimization is the root of all evil.

In the early development stages, the design of the program can change quickly,
requiring you to rewrite and reorganize big chunks of code. By testing different
prototypes without bothering about optimizations, you learn more about your
program, and this will help you make better design decisions.
Benchmarking and Profiling

The mantras that you should remember when optimizing your code, are as follows:

• Make it run: We have to get the software in a working state, and be sure that
it produces the correct results. This phase serves to explore the problem that
we are trying to solve and to spot major design issues in the early stages.
• Make it right: We want to make sure that the design of the program is solid.
Refactoring should be done before attempting any performance optimization.
This really helps separate the application into independent and cohesive
units that are easier to maintain.
• Make it fast: Once our program is working and has a good design we want
to optimize the parts of the program that are not fast enough. We may also
want to optimize memory usage if that constitutes an issue.

In this section we will profile a test application—a particle simulator. The simulator
is a program that takes some particles and evolves them over time according to a
set of laws that we will establish. Those particles can either be abstract entities or
correspond to physical objects. They can be, for example, billiard balls moving on
a table, molecules in gas, stars moving through space, smoke particles, fluids in a
chamber, and so on.

Those simulations are useful in fields such as Physics, Chemistry, and Astronomy,
and the programs used to simulate physical systems are typically performance-
intensive. In order to study realistic systems it's often necessary to simulate the
highest possible number of bodies.

In our first example, we will simulate a system containing particles that constantly
rotate around a central point at various speeds, like the hands of a clock.

The necessary information to run our simulation will be the starting positions of
the particles, the speed, and the rotation direction. From these elements, we have
to calculate the position of the particle in the next instant of time.

[8]
Chapter 1

(vx, vy)

(x, y)

(0, 0)

The basic feature of a circular motion is that the particles always move
perpendicularly to the direction connecting the particle and the center, as shown in
the preceding image. To move the particle we simply change the position by taking a
series of very small steps in the direction of motion, as shown in the following figure:

[9]
Benchmarking and Profiling

We will start by designing the application in an object-oriented way. According to


our requirements, it is natural to have a generic Particle class that simply stores
the particle position (x, y) and its angular speed:
class Particle:
def __init__(self, x, y, ang_speed):
self.x = x
self.y = y
self.ang_speed = ang_speed

Another class, called ParticleSimulator will encapsulate our laws of motion and
will be responsible for changing the positions of the particles over time. The __
init__ method will store a list of Particle instances and the evolve method will
change the particle positions according to our laws.

We want the particles to rotate around the point (x, y), which, here, is equal to (0, 0),
at constant speed. The direction of the particles will always be perpendicular to the
direction from the center (refer to the first figure of this chapter). To find this vector

v=(vx ,vy)
(corresponding to the Python variables v_x and v_y) it is sufficient to use these
formulae:

vx= -y/ x 2+y 2


vy= x/ x 2+y 2

If we let one of our particles move, after a certain time dt, it will follow a circular path,
reaching another position. To let the particle follow that trajectory we have to divide
the time interval dt into very small time steps where the particle moves tangentially
to the circle. The final result, is just an approximation of a circular motion and, in fact,
it's similar to a polygon. The time steps should be very small, otherwise the particle
trajectory will diverge quickly, as shown in the following figure:

[ 10 ]
Chapter 1

In a more schematic way, to calculate the particle position at time dt we have to carry
out the following steps:

1. Calculate the direction of motion: v_x, v_y.


2. Calculate the displacement (d_x, d_y) which is the product of time and speed
and follows the direction of motion.
3. Repeat steps 1 and 2 for enough time steps to cover the total time dt.

The following code shows the full ParticleSimulator implementation:


class ParticleSimulator:

def __init__(self, particles):


self.particles = particles

def evolve(self, dt):


timestep = 0.00001
nsteps = int(dt/timestep)

for i in range(nsteps):
for p in self.particles:

# 1. calculate the direction


norm = (p.x**2 + p.y**2)**0.5
v_x = (-p.y)/norm
v_y = p.x/norm

# 2. calculate the displacement


d_x = timestep * p.ang_speed * v_x
d_y = timestep * p.ang_speed * v_y

p.x += d_x
p.y += d_y
# 3. repeat for all the time steps

[ 11 ]
Benchmarking and Profiling

We can use the matplotlib library to visualize our particles. This library is not
included in the Python standard library. To install it, you can follow the instructions
included in the official documentation at:
http://matplotlib.org/users/installing.html

Alternatively, you can use the Anaconda Python distribution


(https://store.continuum.io/cshop/anaconda/)
that includes matplotlib and most of the other third-party
packages used in this book. Anaconda is free and available for
Linux, Windows, and Mac.

The plot function included in matplotlib can display our particles as points on
a Cartesian grid and the FuncAnimation class can animate the evolution of our
particles over time.

The visualize function accomplishes this by taking the particle simulator and
displaying the trajectory in an animated plot.

The visualize function is structured as follows:

• Setup the axes and display the particles as points using the plot function
• Write an initialization function (init) and an update function
(animate) that changes the x, y coordinates of the data points using the
line.set_data method
• Create a FuncAnimation instance passing the functions and some parameters
• Run the animation with plt.show()

The complete implementation of the visualize function is as follows:


from matplotlib import pyplot as plt
from matplotlib import animation

def visualize(simulator):

X = [p.x for p in simulator.particles]


Y = [p.y for p in simulator.particles]

fig = plt.figure()
ax = plt.subplot(111, aspect='equal')
line, = ax.plot(X, Y, 'ro')

# Axis limits
plt.xlim(-1, 1)
plt.ylim(-1, 1)

[ 12 ]
Chapter 1

# It will be run when the animation starts


def init():
line.set_data([], [])
return line,

def animate(i):
# We let the particle evolve for 0.1 time units
simulator.evolve(0.01)
X = [p.x for p in simulator.particles]
Y = [p.y for p in simulator.particles]

line.set_data(X, Y)
return line,

# Call the animate function each 10 ms


anim = animation.FuncAnimation(fig, animate,
init_func=init, blit=True,# Efficient animation
interval=10)
plt.show()

Finally, we define a small test function—test_visualize—that animates a


system of three particles rotating in different directions. Note that the third particle
completes a round three times faster than the others:
def test_visualize():
particles = [Particle( 0.3, 0.5, +1),
Particle( 0.0, -0.5, -1),
Particle(-0.1, -0.4, +3)]

simulator = ParticleSimulator(particles)
visualize(simulator)

if __name__ == '__main__':
test_visualize()

Writing tests and benchmarks


Now that we have a working simulator, we can start measuring our performance
and tuning-up our code, so that our simulator can handle as many particles
as possible. The first step in this process is to write a test and a benchmark.

We need a test that checks whether the results produced by the simulation are
correct or not. In the optimization process we will rewrite the code to try different
solutions; by doing so we may easily introduce bugs. Maintaining a solid test suite
is essential to avoid wasting time on broken code.

[ 13 ]
Benchmarking and Profiling

Our test will take three particle and let the system evolve for 0.1 time units. We
then compare our results, up to a certain precision, with those from a reference
implementation:
def test():
particles = [Particle( 0.3, 0.5, +1),
Particle( 0.0, -0.5, -1),
Particle(-0.1, -0.4, +3)]

simulator = ParticleSimulator(particles)

simulator.evolve(0.1)

p0, p1, p2 = particles

def fequal(a, b):


return abs(a - b) < 1e-5

assert fequal(p0.x, 0.2102698450356825)


assert fequal(p0.y, 0.5438635787296997)

assert fequal(p1.x, -0.0993347660567358)


assert fequal(p1.y, -0.4900342888538049)

assert fequal(p2.x, 0.1913585038252641)


assert fequal(p2.y, -0.3652272210744360)

if __name__ == '__main__':
test()

We also want to write a benchmark that can measure the performance of our
application. This will provide an indication of how much we have improved
over the previous implementation.

In our benchmark we instantiate 100 Particle objects with random coordinates


and angular velocity, and feed them to a ParticleSimulator class. We then let
the system evolve for 0.1 time units:
from random import uniform

def benchmark():
particles = [Particle(uniform(-1.0, 1.0),
uniform(-1.0, 1.0),
uniform(-1.0, 1.0))
for i in range(1000)]

simulator = ParticleSimulator(particles)
simulator.evolve(0.1)

if __name__ == '__main__':
benchmark()

[ 14 ]
Chapter 1

Timing your benchmark


You can easily measure the execution time of any process from the command line by
using the Unix time command:
$ time python simul.py
real 0m1.051s
user 0m1.022s
sys 0m0.028s

The time command is not available for Windows, but can be found
in the cygwin shell that you can download from the official website
http://www.cygwin.com/.

By default, time shows three metrics:

• real: The actual time spent in running the process from start to finish, as if it
was measured by a human with a stopwatch
• user: The cumulative time spent by all the CPUs during the computation
• sys: The cumulative time spent by all the CPUs during system-related tasks
such as memory allocation

Notice that sometimes user + sys might be greater than real, as multiple processors
may work in parallel.

time also offers several formatting options; for an overview you can
explore its manual (by using the man time command). If you want a
summary of all the metrics available, you can use the -v option.

The Unix time command is a good way to benchmark your program. To achieve
a more accurate measurement, the benchmark should run long enough (in the
order of seconds) so that the setup and tear-down of the process become small,
compared to the execution time. The user metric is suitable as a monitor for the
CPU performance, as the real metric includes also the time spent in other
processes or waiting for I/O operations.

Another useful program to time Python scripts is the timeit module. This module
runs a snippet of code in a loop for n times and measures the time taken. Then, it
repeats this operation r times (by default the value of r is 3) and takes the best of
those runs. Because of this procedure, timeit is suitable to accurately time small
statements in isolation.

[ 15 ]
Benchmarking and Profiling

The timeit module can be used as a Python module, from the command line, or
from IPython.

IPython is a Python shell designed for interactive usage. It boosts tab completion and
many utilities to time, profile, and debug your code. We will make use of this shell to
try out snippets throughout the book. The IPython shell accepts magic commands—
statements that start with a % symbol—that enhance the shell with special behaviors.
Commands that start with %% are called cell magics, and these commands can be
applied on multi-line snippets (called cells).

IPython is available on most Linux distributions and is included in Anaconda.


You can follow the installation instructions in the official documentation at:
http://ipython.org/install.html

You can use IPython as a regular Python shell (ipython) but it is


also available in a Qt-based version (ipython qtconsole) and
as a powerful browser-based interface (ipython notebook).

In IPython and command line interfaces it is possible to specify the number of


loops or repetitions with the options -n and -r, otherwise they will be determined
automatically. When invoking timeit from the command line, you can also give a
setup code that will run before executing the statement in a loop.

In the following code we show how to use timeit from IPython, from the command
line and as a Python module:
# IPython Interface
$ ipython
In [1]: from simul import benchmark
In [2]: %timeit benchmark()
1 loops, best of 3: 782 ms per loop

# Command Line Interface


$ python -m timeit -s 'from simul import benchmark' 'benchmark()'
10 loops, best of 3: 826 msec per loop

# Python Interface
# put this function into the simul.py script

import timeit
result = timeit.timeit('benchmark()',
setup='from __main__ import
benchmark', number=10)
# result is the time (in seconds) to run the whole loop

[ 16 ]
Discovering Diverse Content Through
Random Scribd Documents
serve God and man in this country must haul his own weight and
bear others’ burdens too. He must lay aside hindrances—he must
forfeit love of home and kindred—he must learn to keep normal and
cheerful in the aching solitudes.
Many are with the Doctor for a season or so. Some like Dr. Little,
Dr. Paddon and Dr. Andrews and certain others who deserve to be
named honoris causa—have stood by him year after year. But by this
time there is a small army of short-term or long-term Grenfell
graduates—men and women—who had “their souls in the work of
their hands” and whose precious memories are of the days they
spent in assuaging the torment, physical or spiritual, of plain fisher-
folk. It is not possible to separate in this case the care of bodies
from the cure of souls. The “wops” who brought the schooner
George B. Cluett from Boston year after year, laden with lumber and
supplies, and then went ashore to be plumbers and carpenters and
jacks-of-all-trades for love and not for hire have their own stories to
tell of “simple service simply given to their own kind in their human
need.” Most of them knew just what they would be up against; they
knew it would not be a glorified house-party; but they accepted the
isolation and the crudeness and the cold and the unremitting toil,
and in the spirit of good sportsmanship which is the ruling spirit of
the Grenfell undertaking they played the game, and what they did is
graven deep in the Doctor’s grateful memory.
The Doctor wins and keeps the enthusiastic loyalty of his
colleagues because he is so ready with the word of emphatic praise
for what they do when it is the right thing to do. He is fearless to
condemn, but he would rather commend, and the flush of pleasure
in the face of the one praised tells how much his approval has meant
to the recipient. He knows how many persons in this human, fallible
world of ours travel faster for a pat than for a kick or a blow.
A halt was called at Forteau for a few hours’ conference with one
of the remarkable women who have put their shoulders under the
load of the Labrador—Sister Bailey, once a co-worker with Edith
Cavell. At Forteau she has a house that holds an immaculate
hospital-ward and an up-to-date dispensary. For twelve years—
except for two visits in England—she has held the fort here without
the company of her peers, except at long intervals. She has kept
herself surrounded with books and flowers, and her geraniums are
exquisite. Sister Bailey’s cow, bought for $40 in a bargain at Bonne
Esperance (“Bony,”) is a wonder, and I took pains to stroke the nose
of this “friendly cow” and praise her life-giving endeavours. For each
day at the crack of dawn there is a line-up of people with all sorts of
containers to get the milk. The dogs, of course, would cheerfully kill
the animal if they could pull her down, but she fights them off with
her horns, and they have learned a wholesome fear. She is not like
the cow at Bonne Esperance today, which has suffered the loss of
part of its hind quarters because it was too gentle.
Under Sister Bailey’s roof three maids, aged 12, 13 and 22, are
being educated in household management. She has a garden with
the dogs fenced out, and there is a skirmish with the weeds all
through the summer into which winter breaks so suddenly. There is
no spring; there is no fall; flowers, vegetables and weeds appear
almost explosively together.
Artificial flowers are beautifully made—with dyes from Paris—by
the girls of Forteau Cove, under Sister Bailey’s supervision. The hues
are remarkably close to the original and the imitation of petal and
leaf is so close as to be startling.
ST. ANTHONY HOSPITAL IN WINTER.
SOME OF THE HELPERS.

No description of Dr. Grenfell’s “parish,” as Norman Duncan aptly


styled it, could be complete without mention—that would be much
more extended did she permit—of the part Mrs. Grenfell fills in all
that the Doctor does. Mrs. Grenfell was Miss Anna MacClanahan, of
Chicago, and she is a graduate of Bryn Mawr. The Doctor went to
the Labrador years before his marriage, but since she took her place
at his side with her tact, her humour, her common sense, her sound
judgment and her broad sympathies, she has been a tower of
strength, a well-spring of solace and of healing, and altogether an
indispensable factor in her husband’s enterprise.
She is his secretary, and the number of letters to be written, of
patients’ records to be kept, of manuscripts to be prepared for the
press is enormous. The Doctor pencils a memorandum when and
where he can—perhaps sitting atop of a woodpile on the reeling
deck of the Strathcona; and then Mrs. Grenfell tames the rebellious
punctuation or supplies the missing links of predicates or
prepositions and evolves a manuscript that need not fear to face the
printer.
The letters of appeal are almost innumerable, of protest
occasional, of sympathy and friendship—with or without
subscriptions—very numerous, and Mrs. Grenfell has the happy gift
of saying “thank you” in such warm and gracious, individualizing
terms that the donor is enlisted in a lifelong friendship for the
Grenfell idea.
Mrs. Grenfell is “the life of the party” wherever she goes. Like the
Doctor, she refuses to grow tired of the great game of living, and it
is a game they play together in a completely understanding and
sympathetic copartnership.
General “Chinese” Gordon once gave as the reason for not
marrying the fact that he had never found the woman who would
follow him anywhere. Dr. Grenfell has been more fortunate. A friend
of theirs tells me that Dr. Grenfell proposed on shipboard, almost the
minute he met his wife. Astounded by his precipitancy, she said:
“But, Doctor, you don’t even know my name!” “That doesn’t make
any difference; I know what it’s going to be,” is said to have been his
characteristic answer.
Mrs. Grenfell was translated from a life that might have been one
of ease and pleasure and social preoccupation into a life of
unremitting toil and no small measure of actual hardship, and she
meets the day and whatever it brings in the same high-hearted
mood that her husband carries to the various phases of his crowded
existence. She is his mentor—without being a tormentor; she is his
business memory and a deal of his common sense and social
conscience: but she never lets her fine, keen mind, her quick wit and
her readily divining intuition become absorbed in the mechanic
phases of the regulation of household or boatload business. She has
the happy faculty of instant transplantation from the practical task to
the ideal atmosphere. She is the Doctor’s workmate, playmate and
helpmate: the complete and inspiring counterpart. She knows better
than anybody else that she has a great man for a husband, but she
never lets that consciousness become oppressive, and she knows
that it is good for them both to yield to the playful spirit of rollicking
nonsense and absurd horseplay now and then. So you needn’t be
surprised if you should find the pair chasing each other about the
deck pretending a mortal combat with billets of birch-wood, while
the distracted Fritz the dog cannot make up his mind whether he is
in duty bound to bite his mistress or his master. You needn’t be
surprised if the Doctor goes through a mighty pantomime of
barricading his chart-room as though his better half had no business
in it, or hides some one of her cherished Lares and Penates and
assumes an innocent ignorance of its whereabouts. When he is at
play Dr. Grenfell is not a bit older than the youngest of his three
delightful children whose combined ages cannot be much more than
fifteen years. He is the same sort of amusing and devoted father as
the mourned and beloved head of the household at Sagamore Hill,
who to Dr. Grenfell—of course—is the pattern of all that the head of
a family and the soul of a nation should be.
The family life of the Grenfells and the perfect mutuality of
thought and feeling between Dr. Grenfell and his wife stand out in
clear-cut lines as an example to those who never have known the
meaning of the complete community of ideals in the family life and
in the relationship of wife and husband. It stands in rebuke to the
sorrowful travesty the modern marriage so often exhibits. It shows
how the strength of either partner in the marriage of true minds is
multiplied tenfold and how the yoke is easy and the burden is light
when love has entered in⁠—

“The love you long to give to one


Made great enough to hold the world.”
XI
FOUR-FOOTED AIDES: DOGS AND REINDEER
In few places are the dogs so numerous and so noisy as at
Forteau, and Sister Bailey’s team held the primacy for speed and
condition and obedience to command—yet she ruled them by moral
suasion and not by kicks and curses. That does not mean they were
dog angels. Every “husky” is in part a wolf, and the gentlest and
most amiable that fawns upon you will in a twinkling go from the Dr.
Jekyll to the Mr. Hyde in his make-up when the breaking-point is
passed. The leaders of the pack were two monsters named Scotty
and Carlo, and they were rivals to the end of the tether. Carlo was a
sentimentalist of a hue between fawn and grey: his greatest
pleasaunce was to put his forepaws on your shoulders and lick your
nose ere you could stave him off. Scotty’s nose—he was black and
white—was embossed with the marks of many bitter duels. Probably
the other dogs could read those marks, as a Bret Harte cowboy
could read the notches on a gun, and he won respect commensurate
with the length and breadth of the scratches. Scotty came with us
on the Strathcona, as his mistress was leaving for a rest in England
shortly. It was a job to persuade him aboard the boat, but once
there he entered into a tacit agreement, as between gentlemen, that
he should have the after deck while Fritz, our official dog,
monopolized the prow. Scotty had the better of the bargain, for his
bailiwick included the cook’s galley. But Fritz could sleep on the floor
of my cabin, though whenever I looked for him on the floor he was
snugly ensconced in a forbidden lower bunk, curled up like a jelly
roll. He learned to vacate without even a word when I gazed at him
reproachfully.
All Sister Bailey’s dogs, and a great many more, converged upon
the beach when Fritz swam ashore and shook himself free from such
marine algae as he might have collected on his course. We kept Fritz
close at heel, but there were constant alarums and incursions. As we
sauntered along the shore path by the fish-flakes where the women
were turning over the fish under the threat of rain, Fritz was in a
measure taken into the loosely cohesive plunderbund of Sister
Bailey’s pack. They seemed to be saying to him after their fashion:
“Oh, well, you are a foreigner from that ship out yonder in the cove,
to be sure, but here we are passing one hostile tribe after another,
and we may need you any time to help us out in a scrap, so you
may as well travel along with our bushy tails—though yours points
toward the ground, and you can’t be very much of a dog, after all.”
For dogs appeared in squads, platoons, companies, battalions,
even as iron-filings cluster to a magnet. There was a most
outrageous and unholy pow-wow when we had gone about five
houses from the beach. All the dogs from near and far piled into it
like hornets from a broken nest. There was no speech nor language
known to dogdom in which their voices were not heard with howls
and imprecations. Alas! even the gentle Sister Bailey had to abandon
for the nonce her policy of moral suasion and get in among her
protégés with thwackings of a bit of driftwood and a few well-
directed pushes (not to say kicks) of the foot. Any moderate impact,
when a scrap is in full swing, rebounds from the tough integuments
like hailstones landing on a tin roof. Even an every-day argument of
these beasts sounds like wholesale murder. It is a pathetic fact that
with all the affectionate responsiveness of some of the animals to
human notice there always lurks a danger. If you are a stranger,
meeting a strange pack, it is well to keep your eyes upon them, and
if you have not a stick in your hand, or a stone ready to throw, it is
wholesome to stoop groundward and pretend you have a missile.
Then, nine times out of ten, they will scatter. So often one would like
to believe they are all dog, with all of the dog’s graces and
goodnesses—but there reigns in the breast of each a vulpine
jealousy that easily and instantly mounts to a blood-heat of
maddened fury. Dogs of the same litter will fight as furiously and
savagely as born enemies, though they may recognize in the traces
intuitively the leadership of their mother at an age far beyond that at
which civilized puppies become as contemptuous of their mother as
she is of them.
Unhappily, there are many cases on authentic record when young
children and old people, unable to defend themselves, have been
devoured by dogs—not necessarily when the dogs were starving. A
grewsome climax was reached when in the “flu” epidemic of 1918-
19 on the Labrador the dogs fell on the dead and the dying and the
enfeebled survivors could not stem the onslaught. No wonder, then,
that Dr. Grenfell, with all his manifest affection for dogs that he has
known, insists that the importation of reindeer is the salvation and
the solution. Stubbornly the folk of the northern tip of the peninsula
and the Labrador coast cling to the huskies that were banished, in
favour of cows, horses, pigs and chickens, by their more
sophisticated southern neighbours. Uncle Philip Coates at Eddy’s
Cove is the only man on that shore, as far as is known, who keeps
pigs.
A fisherman landing on an island off Cape Charles, on the side
away from his home, found himself the object of the unwelcome
attentions of a pack of dogs who were acting on the principle of the
uncouth villager of the old story who cried: “ ’Ere’s a stranger, Bill—
let’s ’eave ’arf a brick at him.” He is sure they would have pounced
on him and polished off his bones, had he not seen one dog he
knew—the leader. He called the dog’s name; the wolfish creature
halted instantly. When the name was repeated, the dog slunk off, his
ragged retinue at his heels.
It is sad to think that the dogs that will perform so nobly in the
traces are such bad actors when they have nothing to do but to pick
a quarrel in places where perhaps there is no foliage but the proud
curled plumage of their tails. They are beside themselves with
excitement when after the summer siesta they are harnessed to the
komatik again. When the driver smartly rubs his hands and cries,
“See the deer!”—or anything he pleases—it augments the fever. In
Labrador “ouk, ouk!” turns the team to the right—perchance with a
disconcerting promptness—and “urrah, urrah!” swerves it to the left.
The corresponding directions in Newfoundland are “keep off!” and
“hold in.” No reins are used—some drivers use no whip. The books
of Dr. Grenfell abound in affectionate reference to the better nature
of these animals and their extraordinary fidelity to duty. Like most of
the people of the land, they do not fear to die. Their life is largely of
neglect and pain: they spend much of their time crawling under the
houses to get out of the way. Their pleasure is the greater when
they find a human playmate ready to throw a stick into the water for
them. Grand swimmers are they, and they will plunge into the
coldest sea; and if they are hungry they dive in for a small fish
without concern. It is hard to find a time when they are not ready to
set their fangs to food—“full-fed” is an ideal condition to which most
of them seldom attain. A square meal of whalemeat is their
millennium. “I don’t see what satisfaction they get out of it,” said
“Bill” Norwood—one of the volunteer “wops” building the Battle
Harbour reservoir. “The meat in winter comes to them in frozen
hunks, and they slide it down at one gulp, to melt in their stomach.
That’s not quite my idea of enjoying a meal.”
In a yawl that the Strathcona dragged astern three plaintive
huskies, to be committed to the pack at St. Anthony, hungrily sniffed
the meat-laden breeze that blew from our deck. They were
perturbed at finding themselves going to sea. I may add that when
they got ashore the youngest of the three—a mere baby—jumped on
a rock and bit the nose of the leader of the St. Anthony pack, Eric by
name, thereby winning respect for himself and his two comrades
among the aborigines who might otherwise have fallen upon them
and rent them limb from limb.
The dogs at Battle Harbour live up to the name of the
settlement. Like all other “huskies,” they are ready to fight on slight
provocation, and the night is made vocal with their long-drawn
ululations. Their appetite is insatiable—they devour with enthusiasm
whatsoever things are thrown out at the kitchen door—they even ate
a towel that went astray—and when nothing better offers they will
wade into the water in quest of caplin, or cods’ heads. In their
enthusiasm for food the dogs will dig through boards to get at cattle
and pigs, and cows and chickens seldom live where the dogs are
numerous.
The murderous proclivities of the dogs of the Labrador furnished
one of the chief reasons, as has been said before, why the Doctor
went to such great pains and to such a relatively large expense to
import and domicile the reindeer.
“It was wildly exciting work, I can tell you, lassoing those
reindeer and tying their legs in that country over yonder,” he said, as
the Strathcona rounded the rugged bread-loaf island of Cape Onion.
He pointed to the settlement of Island Bay behind it. “There we
were blown across the bay on the ice—dogs, komatik and all—
roaring with laughter at our own predicament, helpless before the
great gale of wind.” Thus he recalls without bitterness the costly
undertaking whose fruition has been—and still is—one of his dearest
dreams. Conveying the captured reindeer across the Strait in a
schooner to Canada with almost nobody to help him was a
Herculean task. Some day the Legislature at St. John’s may see fit to
divert a little money to establishing the docile and reliable reindeer
in place of treacherous and predatory dogs. It is a greater loss to the
island than to Grenfell that the scheme must wait.
With a mob of dogs in every village, a mob actuated most of the
time by an insatiable hunger driving it forth in quest of any sort of
food, it has been impossible in most places to keep a cow or a goat,
and hay is prohibitively costly to import. Dr. Grenfell has described
with pathos how Labrador mothers, in default even of canned milk
for the baby, are in the habit of chewing hard bread into a pulpy
mass to fill the infant’s mouth and thus produce the illusion of
nutriment until it is able to masticate and assimilate “loaf” for itself.
In few countries is milk so scarce.
The reindeer might be the cow of the Labrador. The reindeer is
able to find a square meal amid the moss and lichens, and it yields
milk so rich as to require dilution to bring it down to the standard of
cow’s milk, while it is free from the peculiar flavour of the milk of the
goat. The Lapps make the milk into a “cream cheese” which Dr.
Grenfell has tried out on his sledge journeys and heartily endorses.
Nearly three hundred reindeer were obtained by Dr. Grenfell in
Lapland in 1907, with three Lapland families to herd them and teach
herding. They were landed at Cremailliere, (locally called
“Camelias”), three miles south of St. Anthony. At the end of four
years the herd numbered a thousand. In 1912, twelve hundred and
fifty at once were corraled. Poaching and want of police protection
made it desirable to transfer the animals across the Straits to
Canada. Some of them, by virtue of strenuous effort, were collected
in 1918 and transported to the St. Augustine River district where
now they flourish and increase in number. Some day, it would seem
from the great success of the reindeer-herds of Alaska—introduced
by Dr. Sheldon Jackson and fostered by the United States
Government—these fine animals will surely replace the dogs on the
Labrador, when local prejudice against them has been overcome or
has evaporated. They are useful not merely for the milk but for the
meat and the skins, as well as for transportation. They live at peace
instead of on the precarious verge of battle. The “experiment” has
not collapsed in dismal failure. It is only in abeyance to the ultimate
assured success, and it is not too much to predict that another
generation or two will see the reindeer numerous and useful
throughout the Labrador.
XII
A WIDE, WIDE “PARISH”
To take the measure of the man Dr. Grenfell is and the work he
does it is necessary to know something of the land and the waters
round about, where he puts his life in jeopardy year after year, day
unto day, to save the lives of others. There is much more to “Dr.
Grenfell’s parish” than the “rock, fog and bog” of the old saying.
Such observations as are here assembled are the raw material for
the Doctor’s inimitable tales of life on the Labrador.
The great fact of life here is the sea, and much of existence is in
giving battle to it. The little boys practice jumping across rain-barrels
and mud-puddles, because some day they hope to get a “ticket” (a
berth on a sealer) and go to the ice, and when it is “a good big copy
from pan to pan”—that is to say, a considerable distance from one
floating ice-cake to the next—their ability to jump like their own
island sheep may save their lives.
SIGNAL HILL, HARBOUR OF ST. JOHNS.

The word “copy” comes from the childish game of following the
leader and doing as he does. A little piece of ice is called a knob,
and a larger piece is a pan. A pan is the same thing as a floe, but
the latter expression is not in common usage.
Every youth who aspires to qualify as a skipper must go before
an examining board of old sea-wise and weather-wise pilots, and
prove himself letter-perfect in the text of that big book, “The
Newfoundland and Labrador Pilot and Guide.” His examiners scorn
the knowledge of the book, very often, for they have the facts at the
fingers’ ends from long and harsh experience of the treacherous
waters, with the criss-cross currents, the hidden reefs, the sudden
fogs, the contrary winds. So they delight to make life miserable for
the young mariner by heckling him.
The disasters that now and then overtake the sealing-fleet are
ever present in the minds of those who do business in these waters.
They know what it means for a ship’s company to be caught out on
the ice in a snow-storm, far from the vessel. In early March the
wooden ships race for the Straits of Belle Isle, and three days later
the faster iron ships follow. When they get to where the seals are
sunning themselves around the blow-holes in the ice, the crew go
out with their gaffs (staves) and kill the usually unresisting animals
by hitting them over the back of the head. It sounds like simple and
easy hunting, and in good weather it is. But a long-continued storm
changes the complexion of the adventure to that of the gravest peril.
One captain saved his men by making them dance like mad the
long night through, while he crooned the music to them. At the end
of each five minutes he let them rest on their piles of gaffs, and then
they were made to spring to their feet again and resume the frantic
gyrations that kept them from freezing to death. In the same storm,
the Greenland of Harbour Grace lost 52 of her 100 men.
They still talk of the fate of the Queen on Gull Island off Cape St.
John, though the wreck took place nigh unto forty years ago. There
was no lighthouse then. The island lifts its head hundreds of feet
above the mean of the tides, and only the long rank grass and the
buttercups live there in summer. But this was in a December night,
and the wind blew a gale. There were six passengers—a woman
among them. When the passengers had battled their way ashore
through the leaping surf, the crew went back on the doomed ship to
salvage some of the provisions. For they knew that at this forsaken
angle of the island no help from any passing ship was likely till the
spring.
The passengers toiled to the top of the bleak islet, lugging with
them a fragment of a sail. The crew, aboard the vessel, were carried
by the furious winds and waters out to the Old Harry Shoals, where
they lost their lives when the sea beat the vessel to pieces.
The sequel is known by a little diary in which a doctor—one of
the hapless half-dozen—made notes with his own blood till his
stiffening fingers refused to scrawl another entry.
It seems from this pathetic note-book that the six at the end of a
few days, tortured with thirst and starvation, drew lots to see who
should die.
The lot fell to the woman. Her brother offered himself in her
place.
Then the entries in the book cease; and the curtain that fell was
not lifted till spring brought a solitary hunter to the island. He shot a
duck from his boat, and it fell in the breakers. Afterwards he said it
was a phantom fowl, sent from heaven to guide him. For he did not
see it again, though he landed and searched the beach.
But he saw splinters flung high by the surf that seemed to him a
clear indication of a wreck.
He clambered to the top of the islet. There he found, under the
rotted sail, the six bodies, and in the hand of one, was a piece of
flesh torn from one of the bodies.
Even when their lives are endangered the fishermen preserve
their keen mindfulness of the religious proprieties. Caught on an ice-
pan together, Protestants and Catholics prayed, their backs to one
another, on opposite sides of the pan—and the same thing has
happened in ships’ cabins. The sailors are not above a round oath
now and then, but there are many God-fearing, prayerful men
among them. “These are my sailing orders, sir,” said an old retired
sea-dog to me as he patted the cheek of his Bible.
Phrases of the sea enter into every phase of daily human
intercourse. “You should have given yourself more room to veer and
haul,” said the same old sailor to me when I was in a hurry. Fish
when half-cured are said to be “half-saved,” and a man who is “not
all there” is likely to be styled “half-saved.”
“Down killik” is used impartially on arrival at the fishing grounds
or at home after a voyage—the “killik” being a stone anchor for
small craft or for nets. (A “killy-claw” is of wood with the stone in the
middle.) You may hear an old fisherman say of his retirement from
the long warfare with the sea for a living: “My killiks are down; my
boat is moored.” One of them who was blind in his left eye, said as
he lay dying, referring to his own soul: “She’s on her last tack,
heading for I don’t know where: the port light is out, and the
starboard is getting very dim.” A few minutes later he passed away.
The ordinary talk is full of poetry. “If I could only rig up a derrick,
now, to hoist me over the fore part of the winter,” an old salt will
say, “wi’ the help o’ God and a sou’westerly wind and a few swyles I
could last till the spring.” By “swyles,” of course, he means “seals.” A
man’s a man when he has killed his seal. Seal-meat is an anti-
scorbutic, and the sealers present the “paws,” or flippers, as great
delicacies to their friends. A “big feed” is a “scoff.” Sealing brings
men together in conviviality and comaraderie, and it is the great
ambition of most of the youth of Newfoundland to “go to the ice.”
Many are the stowaways aboard the sealing craft. If a man goes
“half his hand” it means he gets half his catch for his labour.
“Seal” is pronounced “swyle,” “syle,” or “swoyle” and Swale
Island also takes its name from this most important mammal. Seals
wandering in search of their blow-holes have been found as far as
six or seven miles inland.
As might be expected, there survives in the vernacular—
especially of the older people—many words and phrases that smack
of their English dialect origin, and words that were the English
undefiled of Chaucer’s or Shakespeare’s day. Certain proper names
represent a curious conversion of a French name no longer
understood.
In Dorsetshire dialect v is used for f, and in Newfoundland one
hears “fir” pronounced “vir” or “var.” Firewood is “vir-wood.” Women
who are “vuzzing up their vires” are fussing (making ready) their
fires. We have “it wouldn’t be vitty” in place of “it wouldn’t be
fitting.” A pig “veers”; it does not farrow. The use of “thiccy” for
“this” is familiar to readers of “Lorna Doone.” “The big spuds are not
very jonnick yet” means that the potatoes are not well done. If
something “hatches” in your “glutch,” it catches in your throat.
Blizzard is a word not used, and a lass at school, confusing it with
gizzard, said it meant the insides of a hen. The remains of birds or of
animals are the “rames.” “O yes you, I ’low” is a common form of
agreement. To be photographed is to be “skitched off,” and of
snapshots it is sometimes said by an old fisherman to a “kodak
fiend”: “I heard ye firin’ of ’em.”
“Cass ’n goo,” for “can’t you go” may be heard at Notre Dame
Bay, as well as “biss ’n gwine” for “aren’t you going?” and “thees
cass’n do it” for “thee can’t do it.” The berries called “harts” (whorts)
are, I presume, the “hurts” of Surrey.
A vivid toast for a sealer going to the icefields was “Bloody decks
to ’im!”
When bad weather is brewing, “We’re going to have dirt” is a
common expression.
A fisherman who had hooked a queer creature that must have
been first cousin to the sea-serpent said, “It had a head like a hulf, a
neck like a harse; I cut the line and let it go to hell.”
Here is a puzzler: “Did ye come on skits or on cart and dogs?”
That means, “Did you come on skates or on a dog-sledge?” Dog-cat
is a dog-sledge. Cat is short for catamaran, which is not a sea-boat
but a land-sledge, so that when you hear it said: “He’s taken his dog
and his cat and gone to the woods” you may know that it means
“He’s taken his dog and his sledge.”
Just as we change the position of the r in going from three to
third, we find the letters transposed in “aps” for aspen, “haps” for
hasp, “waps” for “wasp” and “wordle” for world. Labrador is
Larbador, and “down to the Larbador” or “down on the Larbador”
are common expressions.
Instead of “the hatch” the telescoped form “th’ ’atch” is used. We
have “turr” for “tern” and “loo” for “loon,” and “yammit” (emmet) for
“ant.”
The tendency to combine syllables is illustrated in the
pronunciation of Twillingate as Twulngate.
A scaffolding for fish is known as a “flake.” Here the split cod are
outspread to dry and, by the way, a decision of the Newfoundland
Supreme Court declares “cod” and “fish” synonymous. The
scaffolding is made of poles called longers, and it is suggested that
these “longers” are the “longiores” which Caesar used to build
bridges, according to his Commentaries. A silk hat is known as a
beaver, or behaviour, and so when you hear it said, “I saw Tom
Murphy; he must have been at a funeral; he had his behaviour on,”
it means not that he was circumspect in his conduct, but that he
wore the formal headgear. “Sammy must ’a’ been writin’ some
poetry. I saw him just now a-humourin’ of it with his foot.” Cannot
you see the bard beating out the rhythm with his foot, as a musician
sometimes does when he is sure that he is in time and the rest are
mistaken?
“South’ard,” “north’ard,” “east’ard,” “west’ard” are current
maritime usage, and the adjective “wester” is heard.
Legal Latin is drawn upon for “tal qual”—talis qualis—applied in a
bargain for fish “just as they come.”
Here is a quaint one. The end of a pile, above the surface of a
wharf, is a gump-head. Gump and block are one and the same thing.
We of the United States use the word “gump” or “chump”
figuratively for a “blockhead.”
“The curse o’ Crummle on ye” is a rural expression still heard,
and refers to Cromwell’s bloody descent on Ireland.
“I find my kinkhorn and I can’t glutch” means “I have a pain in
my throat and I can’t swallow.” The kinkhorn is the Adam’s apple. A
man at Chimney Cove remarked: “I have a pain in my kinkhorn and
it has gone to my wizen (chest).”
A dog is often called a “crackie.” Caribou is shortened to “boo.” A
door that has stuck is said to be “plimmed up.” A man who ate hard
bread and drank water said “It plimmed up inside and nearly killed
me.”
To say of a girl that she “blushed up like a bluerag” refers to the
custom of enclosing a lump of blueing in a cloth when laundering
clothes. “The wind baffles round the house” is a beautiful way of
saying that it was blustering.
“Bruise” is a very popular dish of hard bread boiled with fish, and
with “scrunchins” (pork) fried and put over it. It is the equivalent of
Philadelphia’s famous “scrapple.” A guide, admitting that bread and
tea are the staple articles of diet in many an outpost, said
reflectively: “Yes, that’s all those people live on. Now there’s other
things. There’s beans.”
When a man says that his hands are “hard afrore” (hard frozen)
we remember Milton in “Paradise Lost,” “the air burns frore.” Frozen
potatoes are “frosty tiddies.” Head is often called “heed.” “Tigyer,”
said by an old man to a mischievous lad, means “Take yerself off.”
“Is en?” is a way of saying “Is he?” An old man cut his finger and
said that he had a “risen” on it, which is certainly more of a finality
than a “rising.” “I’m going chock to Gargamelle” means “I’m going all
the way to Gargamelle,” the latter name from “garçon gamelle,” said
to signify “the boy who looks after the soup.”
Instead of “squashed,” “squatted” is a common word, as in the
expression “I squatted my finger.” And there are many other
provincialisms not in the dictionaries.
The fathom is a land-measure of length, as well as a sea-
measure of depth. The leading dog of a team is six or seven
“fathoms” ahead of the komatik.
“Start calm” means perfectly calm, and then they may say
expressively “The wind’s up and down the mast.”
“Puddick” is a common name for the stomach.
“Take it abroad” is “take it apart”; “do you relish enough,” is
“have you eaten plenty?” “Poor sign fish” means that fish are scarce.
Woods that are tall are said to be “taunt.”
These few examples of distinctive phraseology might be
multiplied a thousand-fold.
As for the proper names, a fascinating field of research lies
before a patient investigator who commands the leisure. Here are
but a few of countless examples that might be cited.
French names have been Anglicized in strange ways. Isle aux
Bois thus becomes Isle of Boys—or, as pronounced on the south
coast, Oil of Boys or Oil o’ Boy. Baie de Boules has lost the
significance of boulders that bestud its shores in the name Bay Bulls.
The famous and dreaded Cape Race, near the spot where the
beautiful Forizel was lost, gets its name from the French “razé,”
signifying “sheer.” Reucontre is Round Counter; Cinq Isles has
become St. Keels, and Peignoir is altered to Pinware or Pinyare.
Grand Bruit is Grand Brute; the rocky headland of Blomidon that
nobly commands the mouth of the Humber is commonly called Blow-
me-down; Roche Blanche is Rose Blanche.
One would scarcely recognize Lance-au-Diable in Nancy Jobble.
Bay d’Espoir has been turned into its exact antithesis, in the shape
of Bay Despair. L’Argent Bay is now Bay Le John. Out of Point Enrage
is evolved Point Rosy, and St. Croix is modified to Sancroze
(Sankrose).
Children’s names are likely to be Biblical. They are often called by
the middle name as well—William James, Henry George, Albert
Edward. Merchants’ ledgers must take account of a vast number of
nicknames that are often slight variants on the same name—Yankee
Peter, Foxy Peter, Togo Ben, Sailor Ben, Bucky Ben, Big Tom, Deaf
Tom, Young Tom, Big Jan, Little Jan, Susy’s Jan, Ripple Jan, Happy
Jack. Thomas Cluett comes to be called Tommy Fiddler, whereupon
all the children become Fiddlers, and the wife is Mrs. Fiddler. The
family of Maynards is known as the Miners.
The little boys have a mischievous way of teasing one another as
“bay noddies.” The noddy is a stupid fish that is very good at
catching the smaller fry and then easily allows itself to be robbed of
its prey. The children cry:

“Bay boy, bay boy, come to your supper,


Two cods’ heads and a lump o’ butter.”

We find the children using instead of “Eeny, meeny, miny, mo”


this formula:

“Hiram, Jiram, bumbo lock


Six knives in a clock;
Six pins turning wins.
Dibby, dabby, o-u-t spells out.”

Or:

“Little man driving cattle


Don’t you hear his money rattle?
One, two, sky blue,
Out goes y-o-u.”

Or:

“Silver lock, silver key,


Touch, go run away!”

Or:

“Eetle, ottle, blue bottle,


Eetle, ottle, out!”

Still another is:


“Onery, ury, ickery, Ann,
Fillissy, follissy, Nicholas John,
Kubee, Kowbee, Irish Mary

They throw marbles against a wall for a sort of carom-shot, and


call it “bazzin’ marbles.” “The real precursor of the spring, like the
sure mating of the birds,” said an old man of the game.
In some places there is a local celebrity with a real talent for the
composition of what are known as “come-all-ye’s,” from the fact that
the minstrel is supposed to invite all who will to come and hear him
chant his lay. Every big storm or shipwreck is supposed to be
commemorated in appropriate verse by the laureate. For instance,
one of these ballads begins:

“The Lily Joyce stuck in the ice,


So did the Husky too;
Captain Bill Ryan left Terry behin’
To paddle his own canoe.”

Another runs thus:

“ ’Twas on the 29th of June,


As all may know the same;
The wind did blow most wonderful,
All in a flurry came.”

This was written and sung to a hymn tune.


Song is a common accompaniment of a shipboard task:

“Haul on the bow-line,


Kitty is me darlin’;
Haul on the bow-line,
Haul, boys, haul.”

If a boy doesn’t go across the Straits before he is sixteen, he


must be “shaved by Neptune.” It is almost a disgrace not to have
gone to the Labrador. Neptune is called “Nipkin.” “Nipkin’ll be aboard
to shave you tonight.”
When they are cleaning fish, the last man to wash a fish for the
season gets ducked in the tub.
Some of the older residents are walking epitomes of the island
lore. They know a great deal that never found lodgment in books.
Matty Mitchell, the 63-year old Micmac guide, now a prospector for
the Reid-Newfoundland Company, was a fellow-passenger on the
mail-boat. He was full of tales of the days when the wolf still roamed
the island’s inner fastnesses. I asked him when the last of which he
knew were at large. He said: “About thirty years ago I saw three on
Doctor’s Hill. I have seen none since. There are still lots of bears and
many lynxes. Once I was attacked by six wolves. I waited till the
nearest was close to me—then I shoved my muzzle-loader into his
mouth and shot him and the other five fell away. Another time I was
attacked by three bears who drove me into a lake where I had to
stay till some men who had been with me came to the rescue.
“My grandfather was with Peyton when Mary March and another
Indian woman were captured at Indian Lake. Mary March died at St.
John’s, and was buried there; the other one was brought back to the
shore of the lake.”
“How do you know what minerals you are finding when you are
prospecting?” I asked.
“I was three times in the Museum at St. John’s,” he answered. “I
see everything in the place. That way I know everything that I look
at when I go to hunt for minerals and metals. I hear a thing once—I
got it. I see a thing once—I got it. I never found gold—but I got
pearls from clams, weighing as much as forty grains. I can’t stay in
the house. I must be out in the open. If I stay inside I get sick. I
take colds. I’ve been twice to the Grand Falls in Labrador. At the
upper falls the river rises seven times so”—he arched the back of his
hand—“before the water goes over. The biggest flies I ever saw are
there. They bite right through the clothes. You close the tent—sew
up the opening. You burn up all the flies inside. Next morning there
are just as many.”
Another passenger was the Rev. Thomas Greavett, Church of
England “parson,” with a parish 100 miles long on the West Coast
between Cow Head and Flower’s Cove. He had to be medicine-man
and lawyer too, and in his black satchel he carried a stomach-pump,
a syringe, eight match-boxes of medicine and Gibbon’s “Decline and
Fall.” He told me how he hated to use the mail-boat for his parish
visiting, for it generally meant sleepless nights of pacing the deck or
sitting in the lifeboat in default of a berth. He carried a petition, to
go before the Legislature, reciting the many reasons why the poor
little boat on which we were travelling is inadequate to the heavy
freight and passenger traffic in which she is engaged. With
accommodations for hardly more than 50 passengers, she has
carried 210, 235 and even 300, which meant acute discomfort for
everybody and the open deck, night and day, for many passengers.
What is wanted is a big, heavy ice-breaker. The Ethie never was
meant by her Glasgow builders to fight the Humboldt Glacier bit by
bit as it falls into the sea. In December she was wrecked off Cow
Head in a gale, fortunately with no loss of life.
I don’t know of a harder-working lot than the crew and captain
of a boat that undertakes to carry freight and passengers between
southern ports of Newfoundland and the Labrador.
Take the experience of this vessel, the Ethie, in the summer of
1919 as an example. Under a thoroughly capable and chart-perfect
skipper, Captain English, she made several ineffectual attempts to
get to Battle Harbour through the dense ice-jam before she finally
made that roadstead on June 24. When I met her at Curling to go
north, a week late, at the end of August, she had just come out of a
viscous fog of four days’ duration in the Strait of Belle Isle and in
that fog she had escaped by the closest of shaves a collision with a
berg that towered above her till the top of it was lost in the fog. She
carried so many passengers, short-haul or long-distance, that every
seat in the dining saloon was filled with weary folk at night and
some paced the decks or sat on the piles of lathes or the oil-barrels.
Lumber and barrels were stored everywhere, the hold was crammed,
and cattle in the prow came and went mysteriously as the vessel
moved into one cove or bight or tickle after another in the dead of
the night or the silver cool of the early morning. The clatter of the
steam-winch with the tune of babies strange to the sea-trip, the slap
and scuffle of the waves on our sheet-iron sides and the banging of
the doors as the vessel writhed in her discomfort made an orchestra
of many tongues and percussions. The boat was so heavy with her
cargo of machinery, oil, lumber, flour ($24 a barrel at Battle
Harbour), cattle and human beings that the deck outside my
stateroom was hardly two feet out of water. There were four of us in
the stateroom, but the population changed almost hourly from port
to port, so that I had barely time to get acquainted with a fellow-
passenger ere I lost him to look after his lobster or fish, or his
missionary labours. One of the ship’s company was going to teach
school at Green Island Cove at the northern tip of Newfoundland. He
told me he would get $275 for ten months’ work and out of it would
have to pay board. Yet out of that salary he meant to put by money
to pay for part of a college education at St. John’s. “How old are
you?” I asked. “Not yet eighteen, sir.”
It is easy to see why Dr. Grenfell’s heart and hand go out in a
practical and helpful sympathy to those whose battle with grim,
unmitigated natural forces and with harsh circumstance is unending.
The commonest question asked of anyone who returns from a visit
to the Labrador is “Why do people live there?” Despite the fog and
the cold, the sea-perils and the stark barrenness of the rocks, the
Labrador has an allurement all its own. It has brought a sturdy
explorer like William B. Cabot of Boston (“Labrador” Cabot) again
and again to the rivers and inlets and the central fastnesses, where
he shares the life of the Montagnais and the Nauscapee Indians; and
the same magic has endeared the Labrador to those who year upon
year continue the quest of the cod and the seal and know no life
other than this. Whatever place a man calls his home is likely to
become unreasonably dear to him, however bare and poor it looks
to visitors; and that is the way with the Labrador. But he who cannot
find by sea or land a wild and terrible beauty in the waters and the
luminous skies and the long roll and lift of the blue hills must be
insensible to some of the fairest vistas that earth has to show.
Grenfell and his colleagues do not concede that life on the Labrador
is dull or that the environment is sterile and monotonous and
cheerless. As one of the brave Labrador missionaries, the Rev. Henry
Gordon, has written, “Not only does Labrador rejoice in some of the
finest scenery in North America, but she also possesses a people of
an exceptionally fine type.” Surely it is not right to think of such a
country as a land only of rocks, snows and misery.
XIII
A FEW “PARISHIONERS”
A typical interior gladdened by the Doctor’s presence is this on
the Southern Labrador. A drudge from Nancy Jobble (Lance-au-
Diable) is scrubbing the floor, for the mother is too ill to look to the
ways of her household. The drudge instead of singing is chewing on
something that may be tobacco, paper or gum, and as she slings the
brush about heartlessly she gives furtive eyes and ears to the
visitors. The walls are bestuck with staled and yellowed newspapers.
There are no pictures or books. There is a wooden bench before the
linoleum-covered table, on which are loaves of bread, ill-baked.
There is a stove, of the “Favourite” brand with kettle and teapot
simmering. A tarnished alarm-clock from Ansonia, a mirror, a wash-
stand, shelves with china, tin cans and shreds of bread, a baby’s
crib, a rocking-chair and two more benches forlornly complete the
inventory. There is nothing green in sight from the besmirched
windows but grass and people.
A telegraph operator was reading a volume of the addresses of
Russell Conwell when we entered his not overtasked laboratory. The
book bore the title “How to Get Rich Honestly.” “ ’Fraid I’ll never get
any further than reading about it!” exclaimed the man of the keys
and wires. Dr. Grenfell took the book and presently became
engrossed in the famous address called “Acres of Diamonds.” It
seemed to him the sort of literature to fire the ambition of his
neighbours under the Northern Lights, with its instances of those
who made their way defiant of the odds and in spite of all
opposition.
A very young minister at another Labrador watering-place said to
the Doctor: “You needn’t leave any of your books here. I’m not
interested in libraries. I’m only interested in the spiritual welfare of
the people.”
A run of six miles by power-boat across Lewis Inlet took us to
Fox Harbour and the house of Uncle George Holley. In recent years
the power-boat, even with gasoline at the prevailing high prices, has
become the fisherman’s taxicab or tin Lizzie, and Oh! the difference
to him. He bobs and prances out over the war-dance of the waves
with his barrels and boxes easily, where once it was a mighty toiling
with the sweeps to make his way. The run across the inlet went
swiftly and surely past an iceberg white as an angel’s wing though
with the malign suggestion of the devil behind it: and there were
plenty of chances to take photographs from every possible angle.
Uncle George had on the stage a skinned seal, some whalemeat,
salted cod and a few barrels of salmon. His wife showed us a tiny
garden with cabbages, lettuce, rhubarb, radishes and “greens.” One
year, she said, she had a barrel of potatoes. Indoors she managed to
raise balsam, bachelor’s buttons and nasturtiums. Nowhere in the
world do flowers mean more to those that plant them. Constantly
there comes to mind H. C. Brunner’s poem about a geranium upon a
window-sill: for the flowers which it needs incessant care to keep
from the nipping frost come to be regarded as not merely friends but
members of the family. Uncle George, a fine, patriarchal type, told
vividly how with a dog whip nine fathoms long the expert hand could
cut off the neck of a glass bottle without upsetting the bottle, and
take the bowl from a man’s pipe or the buttons off his coat. No
wonder the huskies slink under the houses when they see a stranger
coming.
The winter of 1918-19 was especially terrible—or “wonderful” as
would be said here—because of the visitation of the “flu.” Conditions
were bad enough in Newfoundland, but in Labrador the “liveyers”
(those who remain the year round) fought their battles in a hopeless
isolation illumined by heroic self-abnegation on the part of a tiny
handful of persons.
When spring released the Labrador Coast from the grip of the
ice, and the tragic tale of the winter was told, the Newfoundland
Government dispatched the Terra Nova (Scott’s Antarctic vessel) to
the aid of the afflicted. Then news filtered out to the world of plague
conditions during that terrible winter more dreadful than those which
De Foe has chronicled. While reading the gruesome details, one is
reminded of the long, lonely and hopeless fight of the early
Jamestown colony against sickness and starvation. Throughout the
bitter months the Red Death stalked its dread way up and down the
Coast, with almost no doctors, nurses or medicines to check the
disease. Whole families were stricken, the living were too weak to
bury the dead or even to fight off the gaunt dogs that hovered
hungrily about the houses; and hamlets were wiped out while
neighbouring villages were unable to send aid.
A few sentences from the diary of Henry Gordon, the brave
missionary at Cartwright, on Sandwich Bay, will suffice to show what
a hideous winter his people passed through. Of this man Dr. Grenfell
said to me: “Instead of a stick with a collar on it we have a man with
a soul in him.” He is always laughing—incurably an optimist, and a
great Boy Scout leader. The following are condensed excerpts.
“Wednesday, Oct. 30, 1918. Reached Cartwright 8 a.m. Mail-boat
had brought ‘the great Plague’ and nearly half the population was
down with it.
“Thursday, Oct. 31. Nearly everybody down now.
“Nov. 1. Whole households stretched inanimate on floors, unable
even to feed themselves or keep fires going.
“Nov. 2. Feeling rotten. Head like a bladderful of wind.
“Nov. 7. Busy all a.m. arranging graves and coffins.
“Nov. 8. Gale N. E. with snow-storms.
“Nov. 17. Two of bodies too much doubled up to put in coffin.
“Nov. 21. Will Leaming in from Indian Harbour with news that ten
are dead at North River still unburied and only three coffins. The rest
are too sick and dismayed to help.
“Nov. 22. (At North River). Some had lain in their beds three
weeks and the stench was appalling. Old Mrs. L. W., aged 71, only
survivor of five, lived alone for a fortnight with four dead. No fire, no
wood, only ice, which she thawed under her arms.
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade

Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.

Let us accompany you on the journey of exploring knowledge and


personal growth!

ebookname.com

You might also like