From 4e1e544088dcf42eaa8554c65b042ff19ce13431 Mon Sep 17 00:00:00 2001 From: Robert Bradshaw Date: Wed, 6 Mar 2013 01:31:16 -0800 Subject: [PATCH] Document drawbacks of excessive typing. --- docs/src/quickstart/cythonize.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/src/quickstart/cythonize.rst b/docs/src/quickstart/cythonize.rst index 655d500..d0f7100 100644 --- a/docs/src/quickstart/cythonize.rst +++ b/docs/src/quickstart/cythonize.rst @@ -109,7 +109,9 @@ Determining where to add types Because static typing is often the key to large speed gains, beginners often have a tendency to type everything in sight. This cuts down on both -readability and flexibility. On the other hand, it is easy to kill +readability and flexibility, and can even slow things down (e.g. by adding +unnecessary type checks, conversions, or slow buffer unpacking). +On the other hand, it is easy to kill performance by forgetting to type a critical loop variable. Two essential tools to help with this task are profiling and annotation. Profiling should be the first step of any optimization effort, and can -- 2.7.4