@@ -11,7 +11,7 @@ Here is a function that computes `\sum_{k=0}^N k` in pure Python::
11
11
....: for k in range(1,N):
12
12
....: s += k
13
13
....: return s
14
- sage: time mysum(10^7)
14
+ sage: % time mysum(10^7)
15
15
16
16
Let us compare this with the Cython version::
17
17
@@ -25,7 +25,7 @@ Let us compare this with the Cython version::
25
25
26
26
::
27
27
28
- sage: time mysum_cython(10^7)
28
+ sage: % time mysum_cython(10^7)
29
29
30
30
31
31
A function to count the number of integer partitions with parts in a
@@ -53,7 +53,7 @@ given set::
53
53
Let us see how long it takes to find the number of partitions of 500
54
54
into odd parts::
55
55
56
- sage: time buying([1,3..500], 500)
56
+ sage: % time buying([1,3..500], 500)
57
57
732986521245024
58
58
Time: CPU 3.05 s, Wall: 3.05 s
59
59
@@ -77,7 +77,7 @@ Make two changes::
77
77
78
78
Surely two tiny changes in some Python code cannot make it much faster::
79
79
80
- sage: time cybuying([1,3..500], 500)
80
+ sage: % time cybuying([1,3..500], 500)
81
81
732986521245024L
82
82
Time: CPU 0.08 s, Wall: 0.09 s
83
83
0 commit comments