Search Members Help

» Welcome Guest
[ Log In :: Register ]

Mini-ITX Boards Sale, Fanless BareBones Mini-ITX, Bootable 1G DSL USBs, 533MHz Fanless PC <-- SALE $200 each!
Get The Official Damn Small Linux Book. DSL Market , Great VPS hosting provided by Tektonic
Pages: (13) </ ... 7 8 9 10 11 [12] 13 >/

[ Track this topic :: Email this topic :: Print this topic ]

reply to topic new topic new poll
Topic: C question, loops< Next Oldest | Next Newest >
pixelbox Offline





Group: Members
Posts: 2
Joined: July 2007
Posted: April 14 2008,01:35 QUOTE

Quote (curaga @ Jan. 12 2008,13:23)
Hm. Appears that after 10 letter words or so bash runs out of memory. And consumes all ram and 100+mb swap. So it isn't practical for long words, which I need :(

Back to drawing board..


It's not as pain in the balls with C,
create file with the words you will search - ie. not in array or string, assign one variable for the current searched word and change that same variable for the new search from the file, it will not have problems with memory
Back to top
Profile PM 
curaga Offline





Group: Members
Posts: 2163
Joined: Feb. 2007
Posted: April 14 2008,13:45 QUOTE

That way I would have trouble with HD space..

--------------
There's no such thing as life. Those mean little jocks invented it ;)
-
Windows is not a virus. A virus does something!
Back to top
Profile PM 
pixelbox Offline





Group: Members
Posts: 2
Joined: July 2007
Posted: April 14 2008,15:51 QUOTE

Quote (curaga @ April 14 2008,09:45)
That way I would have trouble with HD space..

OK, you're right.
Define letters (and or signs) in array as integer numbers, than create words (loops) as strings in real time calling the number from array, loop the numbers and not strings (ie 4 bytes less per letter). Than final word as string is for check (or count).
1 + (2x2) + (3x3x3) + (4x4x4x4) + .... until 13, thats a lot of combinations which means not HD space in this case but fastest PC work of more than days (months?)... that is also countable (how many flops needs program) = that's not much, but access to the password object is making time needed and thats a lot time if Big HD file or network access for up to 13.
Just a program for looping would be measured in seconds.
Back to top
Profile PM 
curaga Offline





Group: Members
Posts: 2163
Joined: Feb. 2007
Posted: April 14 2008,17:39 QUOTE

Yeah, that's a good idea, also very much like the one humpty posted earlier. Currently the perl implementation of Wdef is running, I will perhaps create a C program later, but I don't have time until sunday.

--------------
There's no such thing as life. Those mean little jocks invented it ;)
-
Windows is not a virus. A virus does something!
Back to top
Profile PM 
WDef Offline





Group: Members
Posts: 798
Joined: Sep. 2005
Posted: April 15 2008,13:55 QUOTE

I would use someone else's already-optimized and tested C code or library to do permutations rather than use my own  - it's almost certainly likely to be faster, have a better algorithm, and generally work better.  There is a non-standard library for this as I recall.

Also, I've found a Perl module to do permutations with replacement without generating redundant perms (unlike Algorithm::Permute):

http://search.cpan.org/~tyemq....duction

It also claims to have very low zero memory useage.

I don't think it's an XScode module, so i don't know about speed.
Back to top
Profile PM 
64 replies since Jan. 12 2008,13:35 < Next Oldest | Next Newest >

[ Track this topic :: Email this topic :: Print this topic ]

Pages: (13) </ ... 7 8 9 10 11 [12] 13 >/
reply to topic new topic new poll
Quick Reply: C question

Do you wish to enable your signature for this post?
Do you wish to enable emoticons for this post?
Track this topic
View All Emoticons
View iB Code