I mean this
[code]
def fib(n):
    if n<=1:
        return 1
    return fib(n-1)+fib(n-2)

useCore(1)
timeit(fib(500)) #this show 20 seconds

useCore(2)
timeit(fib(500)) #this show 10 seconds
[/code]

Is it possible?

and more, can threads/multi-processors/clusters be used to improve fib?

thanx
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to