[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: (followup) Re: [despammed] Best way to recursive folders?
From:       Esben Mose Hansen <esben () despammed ! com>
Date:       2003-05-04 16:13:17
[Download RAW message or body]

On Sunday 04 May 2003 17:31, Mosfet wrote:
> BTW, I implemented it this way and it's all good :) I didn't use a stack, I
> used a linked list because I already had one I coded for C, but it's the

In C, I often implement stacks in terms of a (double linked) list, so this 
should be fine. You can squeeze a bit more performance out of the stack if 
you allocate nodes in bunches, like STL's deque, but it probably won't be 
worth it. 

In C++ I just use stack<> of course :o)

> same concept. This is far faster than scanning for subdirectories first
> then processing them iteratively.

Probably :-) 

>
> BTW II, after using C++ for so long I loathe C programming ;-)

Out of curiosity, why are you forced back to C? From the list in which we 
write, I would think that your program is going to run in a KDE 
environment... but maybe you're just maintaining legacy code?

-- 
regards, Esben

esben@despammed.com *---* http://home.worldonline.dk/~mesben


 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic