masterzorag's Activity

Thursday, October 21, 2010

Meanwhile, at lower levels...

Writing OpenCL code needs some C knowledges, in time I've thinked about PMK algo, Cell/BE, python, and C...
How can C code run faster, pointers, arrays and structs, ints, memory allocation/alignment and more...
Time to see what can be done in C, so how easy can be porting mine bruteforge python script other than code written by others?
I've wrote this time ago, code and algorithms are in my mind! I want to see the diffs, and learning C for my needs, of course.
As expected, C uses less memory (68kb over 1990Kb) and runs moOore faster, it generates 10.000.000 words in 3.384s, the python version computes the same numbers of words in 1m46.062s, so I've got a x31 speedup in front of 1/31 in memory!
My new code isn't well optimized, I'll spend some more time with it, but actual results are impressive; so I'm working to complete the C port of bruteforge with renewed logics; all will be in function of the -so called- 'advanced mode', so users can sets a custom charset (including special and spaces characters) and assign a maximum number of use for every char to compose a word!
Patterns eventually excluded like 'abc', 'stuv'... due to consecutiveness will be ever skipped by setting pattern's length, this also for consecutive repetition of same char like 'aaa', 'rrrr'... but I'm re-evaluating others skips like inversed consecutives that in case can skip too often probable words!
When completed, maybe I'll learned C better (a little bit) to expand functionalities, like transform words to compute some kind of hash...
Mine PS3 don't play games, but is hungry of ints!