[pypy-commit] extradoc extradoc: add another para

fijal noreply at buildbot.pypy.org
Thu Oct 27 17:36:40 CEST 2011

Author: Maciej Fijalkowski <fijall at gmail.com>
Branch: extradoc
Changeset: r3949:5c778250e982
Date: 2011-10-27 17:36 +0200

Log:	add another para

diff --git a/blog/draft/faster-json.rst b/blog/draft/faster-json.rst
--- a/blog/draft/faster-json.rst
+++ b/blog/draft/faster-json.rst
@@ -89,6 +89,17 @@
 methods for common infrastructure or loading globals (instead of rebinding as
 locals) is fast enough and improves code readability.
+Copying is expensive
+If you use regular expressions replace, this would always copy a string as of
+now. If you know your regexp is simple, first try to match it if there is
+anything to replace in the first place. This is a pretty hard optimization to
+do automatically -- simply matching the regular expression can be too costly
+for it to make sense. In our particular example however, the regexp is really
+simple, checking ranges of characters. It also seems that this is by far the
+fastest way to escape characters as of now.
 Generators are slower than they should be

More information about the pypy-commit mailing list