» Home » recursion » Page 1
Recursion Recursion Recursion — How can i Improve Performance? (Python Archive Recursive Extraction)
by tamizhvendan in Programming Languages

I am trying to develop a Recursive Extractor. The problem is , it is Recursing Too Much (Evertime it found an archive type) and taking a performance hit.


So how can i improve below code?


My Idea 1:


Get the 'Dict' of direcories first , together with file types.Filetypes as Keys. Extract the file types. When an Archive is found Extract only that one. Then Regen


Parallel recursion slower than “sequential” recursion. Am I doing this wrong?
by kpkp in Programming Languages

I am doing some very basic tests to see if using parallel processing in my program would provide any noticable speed boost. So far, I'm confused as to the results. In my test, I'm building a tree structure with a branching factor of 30. First, I do my testing using no parallelism, then I try the same thing using a parallel for loop. Here are my results:


Sequential:


De

Efficient recursion in functional programming vs. inefficient recursion in different paradigms
by eroussel in Network & Servers

As far as I know recursion is very elegant but unefficient in OOP and procedural programming (see the wonderful "High Order perl", Mark Jason Dominus). I had some informations that in functional programming recursion is fast - keeping its elegance and simplicity. Could someone confirm and possibly amplify this? I am thinking in terms of XSLT and Haskell (high on my next-language-to-learn list)


How does primitive recursion differ from “normal” recursion?
by fayoh in Programming Languages

I am currently reading Simon Thompson's The Craft of Functional Programming and when describing recursion, he also mentions a form of recursion called Primitive Recursion.


Can you please explain how this type of recursion is different from "normal" recursive functions?


Here's an example of a primitive recursion function (in Haskell):


power2 n
| n

difference between structural recursion and accumulative recursion
by Naveen in Web Design

I have been learning scheme and I like to know the difference between the two. Thanks.


How does structural recursion differ from generative recursion?
by Luxembourg in Development Tools & Services

The description of generative recursion in Wikipedia is clear to me, but I'm confused about the concept of structural recursion.


Can someone explain if a function calculating nth Fibonacci number and a function calculating factorial from 1 to N will be structural or generative?


How to do recursion in anonymous fn, without tail recursion
by orneka in Development Tools & Services

How do I do recursion in an anonymous function, without using tail recursion?


For example (from Vanderhart 2010, p 38):


(defn power
[number exponent]
(if (zero? exponent)
1
(* number (power number (- exponent 1)))))

Let's say I wanted to do this as an anonymous function. And for some reason I didn't want to use tail


Recursion in C, understand recursion example
by Rit Li in Programming Languages

i am having trouble understanding this example. I cant figure out what actually happens after a certain point.


Here is the code, the result is supposed to be 4.


I can see that it calls itself several times but how it actually comes to the result of 4 eludes me entirely. Any help would be greatly appreciated.


#include <stdio.h>
int recursion(int

Recursion using STL?
by kharakawa in Programming Languages

I wrote this function to trace a certain spot in a topological tree. However for some reason. Its infinite.


int electricity(int x){
multimap<int,entita,greater<int> >::reverse_iterator it = siet.rbegin();
advance(it,x-1);
if((*it).second.z=='E') return (*it).second.i;
return electricity((*it).first);
}

I de

TAGS : Recursion using

Recursion with doT.js
by luger in Web Design

Assuming I have a data structure like this:


{ list: [ {
name: "1",
children: [{
name: "1.1",
children: []
},
{
name: "1.2",
children: [{
name: "1.2.1",
children: []
TAGS : Recursion with

Next
Privacy Policy - Copyrights Notice - Feedback - Report Violation - RSS 2017 © bighow.org All Rights Reserved .