Is recursion preferred compare to iteration in multicore era?
Posted
by
prM
on Stack Overflow
See other posts from Stack Overflow
or by prM
Published on 2012-09-25T06:10:23Z
Indexed on
2012/09/27
21:37 UTC
Read the original article
Hit count: 245
Or say, do multicore CPUs process recursion faster than iteration?
Or it simply depends on how one language runs on the machine? like c executes function calls with large cost, comparing to doing simple iterations.
I had this question because one day I told one of my friend that recursion isn't any amazing magic that can speed up programs, and he told me that with multicore CPUs recursion can be faster than iteration.
EDIT:
If we consider the most recursion-loved situation (data structure, function call), is it even possible for recursion to be faster?
© Stack Overflow or respective owner