13 "coordinates as strings"
18 for i
in xrange(1000):
19 p
.append(lineto("%d pt" % i
, "%d pt" % i
))
22 c
.writetofile("testspeed")
25 "coordinates in user units"
30 for i
in xrange(1000):
34 c
.writetofile("testspeed")
37 "coordinates in pts (internal routines)"
40 p
=path(pyx
.path
._moveto
(0,0))
42 for i
in xrange(1000):
43 p
.append(pyx
.path
._lineto
(i
, i
))
46 c
.writetofile("testspeed")
48 def testspeedintersect():
49 p
=path(moveto(10,10), curveto(12,16,14,15,12,19))
52 for x
in xrange(1,100):
53 q
=path(moveto(x
/5.0,10), curveto(12,16,14,22,11,16))
55 isect
= bp
.intersect(bq
, epsilon
=1e-3)
57 profile
.run('testspeed()', 'test.prof')
58 pstats
.Stats("test.prof").sort_stats('time').print_stats(10)
60 profile
.run('testspeed2()', 'test.prof')
61 pstats
.Stats("test.prof").sort_stats('time').print_stats(10)
63 profile
.run('testspeed3()', 'test.prof')
64 pstats
.Stats("test.prof").sort_stats('time').print_stats(10)
66 profile
.run('testspeedintersect()', 'test.prof')
67 pstats
.Stats("test.prof").sort_stats('time').print_stats(10)