Lawrence D’Oliveiro wrote:
Don’t forget “functino”. :)
... is that the gauge boson for the function field? Or is that a
“functon”? One of them might be spin-½ ...
A functino would be the supersymmetric partner of a bosonic
function. For a fermionic function, its partner would be
a sfunction.
On Wednesday, September 21, 2016 at 6:05:07 PM UTC+12, Gregory Ewing wrote:
>
> Christian Gollwitzer wrote:
>
>> It may take a microsecond to call a functino from Python.
>
> Obviously the compiler used was a "dump" compiler. :-)
Don’t forget “functino”. :)
For some reason it awakens
Christian Gollwitzer wrote:
However, I'm not convinced it did succeed here. An evaluation of the
Gauß formula would run in a few *nanoseconds* on any moddern machine. It
may take a microsecond to call a functino from Python. a hundred
microseconds means that the loop does run.
Obviously the
Christian Gollwitzer wrote:
> Am 20.09.16 um 09:44 schrieb Peter Otten:
>> Stefan Behnel wrote:
>>
>>> Peter Otten schrieb am 19.09.2016 um 14:55:
In [7]: %%cython
def omega(int n):
cdef long i
cdef long result = 0
for i in range(n): result += i
Am 20.09.16 um 09:44 schrieb Peter Otten:
Stefan Behnel wrote:
Peter Otten schrieb am 19.09.2016 um 14:55:
In [7]: %%cython
def omega(int n):
cdef long i
cdef long result = 0
for i in range(n): result += i
return result
...:
In [8]: %timeit omega(10)
1 loops, best
On 20/09/2016 06:27, Stefan Behnel wrote:
Peter Otten schrieb am 19.09.2016 um 14:55:
In [7]: %%cython
def omega(int n):
cdef long i
cdef long result = 0
for i in range(n): result += i
return result
...:
In [8]: %timeit omega(10)
1 loops, best of 3: 91.6 µs per loop
Stefan Behnel wrote:
> Peter Otten schrieb am 19.09.2016 um 14:55:
>> In [7]: %%cython
>> def omega(int n):
>> cdef long i
>> cdef long result = 0
>> for i in range(n): result += i
>> return result
>>...:
>>
>> In [8]: %timeit omega(10)
>> 1 loops, best of 3: 91.6 µs
On Tuesday, 20 September 2016 11:00:40 UTC+5:30, Stefan Behnel wrote:
> > In [8]: %timeit omega(10)
> > 1 loops, best of 3: 91.6 µs per loop
>
> Note that this is the worst benchmark ever. Any non-dump C compiler will
> happily apply Young Gauß and calculate the result in constant
Peter Otten schrieb am 19.09.2016 um 14:55:
> In [7]: %%cython
> def omega(int n):
> cdef long i
> cdef long result = 0
> for i in range(n): result += i
> return result
>...:
>
> In [8]: %timeit omega(10)
> 1 loops, best of 3: 91.6 µs per loop
Note that this is the
Arshpreet Singh wrote:
> Hope this is good place to ask question about Cython as well.
> Following code of mine is taking 2.5 times more time than Native Python
> code:
>
> %%cython
> import numpy as np
> a = np.array([])
> def large_sum2(int num_range):
> np.append(a,[i for i in
Hope this is good place to ask question about Cython as well.
Following code of mine is taking 2.5 times more time than Native Python code:
%%cython
import numpy as np
a = np.array([])
def large_sum2(int num_range):
np.append(a,[i for i in xrange(num_range)])
return a.sum
%timeit
11 matches
Mail list logo