[pypy-commit] extradoc extradoc: merge

fijal noreply at buildbot.pypy.org
Mon Jul 4 20:37:28 CEST 2011


Author: Maciej Fijalkowski <fijall at gmail.com>
Branch: extradoc
Changeset: r3821:828f6cf048c4
Date: 2011-07-04 20:45 +0200
http://bitbucket.org/pypy/extradoc/changeset/828f6cf048c4/

Log:	merge

diff --git a/sprintinfo/genova-pegli-2011/sprintplanning.txt b/sprintinfo/genova-pegli-2011/sprintplanning.txt
--- a/sprintinfo/genova-pegli-2011/sprintplanning.txt
+++ b/sprintinfo/genova-pegli-2011/sprintplanning.txt
@@ -3,13 +3,12 @@
 1.  cython backend (anto hardshooter) (not done)
 2.  crowdsourcing as a way to get funded (kickstarter like website?  Haskell
 Industry approach? we need a "we are bloody fast" website (lac, all) (half done)
-3.  discuss GIL removal plan (arigo, all) (not done)
+3.  discuss GIL removal plan (arigo, all) DONE
 4.  embedding pypy as a .so  (not done)
 5.  ootype progress, play with jpype (berdario, anto) (not done)
-6.  pypy logging improvements (berdario + others) (not done)
-7.  look in the list of reported bugs and fix them (everybody) (did some)
+7.  look in the list of reported bugs and fix them (everybody) (did some more)
 8.  improving the performance of shadowstack (arigo + somebody) (not done)
-9.  CCP games issues / windows on 64 bit machines  (tismer + others)
+9.  windows on 64 bit machines  (tismer + others) (in-progress)
 10. status of tealet and enhance it (tismer + arigo)
     proof of concept works, but only with Boehm
 11. work on "success stories" part of pypy.org
@@ -21,3 +20,6 @@
 try to do more of it.  Anto has brought an access point.  Maybe this
 will be better.
 
+12. make a quick demo from the sobel algorithm (anto)
+13. investigate the fannkuch benchmark (anto, romain)
+14. visiting Genova (done)
diff --git a/talk/ctpug2011/src/count.py b/talk/ctpug2011/src/count.py
new file mode 100644
--- /dev/null
+++ b/talk/ctpug2011/src/count.py
@@ -0,0 +1,23 @@
+import sys
+import time
+
+def count_mult_of_5(N):
+    mult = 0
+    not_mult = 0
+    for i in range(N):
+        if i % 5 == 0:
+            mult += 1
+        else:
+            not_mult += 1
+    return mult, not_mult
+
+def main():
+    N = int(sys.argv[1])
+    start = time.clock()
+    count = count_mult_of_5(N)
+    end = time.clock()
+    print 'count: ', count
+    print 'time:', end-start, 'secs'
+
+if __name__ == '__main__':
+    main()
diff --git a/talk/iwtc11/benchmarks/image/magnify.py b/talk/iwtc11/benchmarks/image/magnify.py
--- a/talk/iwtc11/benchmarks/image/magnify.py
+++ b/talk/iwtc11/benchmarks/image/magnify.py
@@ -1,3 +1,6 @@
+#!/usr/bin/env python
+
+import errno
 from plain import Image
 from math import atan2, sqrt, sin, cos, ceil, floor
 
@@ -65,7 +68,13 @@
 
     start = start0 = time()
     for fcnt, img in enumerate(mplayer(MyImage, fn)):
-        view(magnify(img))
+        try:
+            view(magnify(img))
+        except IOError, e:
+            if e.errno != errno.EPIPE:
+                raise
+            print 'Exiting'
+            break
         print 1.0 / (time() - start), 'fps, ', (fcnt-2) / (time() - start0), 'average fps'
         start = time()
         if fcnt==2:
diff --git a/talk/iwtc11/benchmarks/image/sobel.py b/talk/iwtc11/benchmarks/image/sobel.py
--- a/talk/iwtc11/benchmarks/image/sobel.py
+++ b/talk/iwtc11/benchmarks/image/sobel.py
@@ -1,3 +1,4 @@
+import errno
 from noborder import NoBorderImagePadded
 from math import sqrt
 
@@ -78,8 +79,15 @@
         #view(img)
         #sobeldx(img)
         #view(uint8(sobel_magnitude(img)))
-        view(sobel_magnitude_uint8(img))
         #sobel_magnitude_uint8(img)
+        try:
+            view(sobel_magnitude_uint8(img))
+        except IOError, e:
+            if e.errno != errno.EPIPE:
+                raise
+            print 'Exiting'
+            break
+
         print 1.0 / (time() - start), 'fps, ', (fcnt-2) / (time() - start0), 'average fps'
         start = time()
         if fcnt==2:
diff --git a/talk/iwtc11/paper.tex b/talk/iwtc11/paper.tex
--- a/talk/iwtc11/paper.tex
+++ b/talk/iwtc11/paper.tex
@@ -122,7 +122,7 @@
 
 \begin{abstract}
 One of the nice properties of a tracing JIT is that many of its optimization
-are simple requiring one forward pass. This is not true for loop-invariant code
+are simple requiring one forward pass only. This is not true for loop-invariant code
 motion which is a very important optimization for code with tight kernels.
 In this paper we present a scheme for making simple optimizations loop-aware by
 using a simple pre-processing step on the trace and not changing the
@@ -246,7 +246,7 @@
 \end{lstlisting}
 
 The iteration of the loop that was peeled off (lines 1-4) is called the
-\emph{preamble}, the loop afterwards the \emph{peeled loop}.
+\emph{preamble}, the loop afterwards (lines 6-9) the \emph{peeled loop}.
 
 Now the optimizer optimizes both of these two iterations of the loop together,
 disregarding the \lstinline{jump} and the label in lines 4-6. Doing this, common
@@ -438,7 +438,7 @@
 
 \section{Making Trace Optimizations Loop Aware}
 
-Before the trace is passed to a backend compiling it into machine code
+Before a trace is passed to the backend compiling it into machine code
 it is optimized to achieve better performance.
 One goal of that is to move 
 operations out of the loop making them executed only once
@@ -446,8 +446,8 @@
 leaves the loop body intact, but prefixes it with one iteration of the
 loop. This operation by itself will not achieve anything. But if it is
 combined with other optimizations it can increase the effectiveness of
-those optimizations. For many optimization of interest some care has
-to be taken when they are combined with loop peeling. This is
+those optimizations. For many optimization of interest only a few
+additional details has to be considered when they are combined with loop peeling. These are
 described below by explaining the loop peeling optimization
 followed by a set of other optimizations and how they interact with
 loop peeling.


More information about the pypy-commit mailing list