Results 1 to 40 of 41

Thread: SOURCE CODE RELEASED FOR FACTORER

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Talking SOURCE CODE RELEASED FOR FACTORER

    http://linux.redbird.com/~alien88/sbfactor125source.zip

    Here's the scoop. I'm posting the full source for the factoring code. Everything. With this, anyone could compile a brand new, working factorer. Why?

    Well, I think there may be a few folks out there who are interested in seeing how it works. I also think there are a few who might want to add to it and that's cool too. Perhaps there are even a few skilled programmers out there who could optimize parts of it. That would be great.

    For starters, this code is for version 1.25 of SBFactor. There is a windows binary of the new SBFactor in my UM directory too if you want it. The only real added feature is the ability to function on numbers of the form k*2^n-1 for our pals working on the Riesel problem. I completed the extra code that does all that stuff today.

    Just to get it out of the way in advance, I'm sure there are some loose ends in the code I could have shored up but I didn't want to tinker to death with it and never get it out so... here. There are many places where I have done things without commenting, many more where I have commented out code for no apparent reason. There is excessive use of globals (mostly a holdover from previous code written by GW). And just to top it all off, the whole mess compiles as one C file with other C files included inside it. I know. It's a tad insane. But honestly, I think the code is still pretty easy to navigate once you work with it for awhile. I don't mean to scare people off cause it's really not that bad. I just need to appologize because it's not the finest example of C code. Don't put this stuff in books and tutorials people!

    Formalities and appologies aside, there are some real opportunities here for people to get involved in a big way. For one, all the asm code is included in this zip so if someone wanted to try and optimize it to increase speed, please, go right ahead. If the optimizations work, the ramifications are huge. First off, SB's internal math routines are compiled from the same exact ASM files. This means that if you find a way to make faster ASM objects, the SB client itself will experience the same exact speed increase as the factorer will. Also, your optimization may be applicable to a bunch of other projects that use this code as well like GIMPS and LLR.

    Other interesting possibilities include (but are certainly not limited to):
    -Prettying up the code so it's not so GodAwful(tm)
    -Writing a GUI for the factorer. Even a simple MFC would help draw more users into using it than the current CLI only interface I made.
    -Add better timing and rate reporting. Right now I just dump status reports with a % finished every now and then. If more accurate progress indicators existed, it would make it easier for people who want to optimize the code to see if their improvements are making a difference.
    -Add threading! It probably wouldn't even be that hard to do. Could really help those of us with multiple processors or HT. You could probably even time things so no more than 1 thread was in stage 2 of a test so that there wouldn't be undue pressure put on the memory.
    -Make a better configuration file. Errr.. make one. Right now it's all command line option driven. Even with a GUI, it may be nice to have a config file.
    -Write some documentation... there is currently no formal docs for the factorer. Almost all knowledge about this program is stored in the pages of this forum. A "HOW-TO" for new users would be nice. A readme for developers could be helpful. Even better usage info on the command line would probably be good.
    -Extend the program to handle other number forms. It took me a total of 3 hours today to code, test, and explain to a new set of users how to use a new version of this code that tests different numbers. Want to factor numbers of the form k*3^n-5? You could probably be doing it in a couple minutes if you just modify this code.
    -Did I mention you could try to optimize the code for speed? Seriously though, there's probably still some low hanging fruit in this orchard. One of the reasons I'm releasing this code is so that I can focus on this area instead of doing the other things, which are also important, like making a GUI, etc but I don't have time to do right now.

    Also, another benefit is that getting familar with how the base of this code works will help prepare anyone who's going to help develop v3 of the client. Even though there are significant differences in how the main client code works, the base of ASM objects and the squaring routines derived from them is the exact same. Plus it will give people a chance to start interacting with Me and Dave a bit before we open client developement. Give us an idea of who might want to do what in that arena.

    So download the code already. If there's interest, I can setup a public cvs server for all this. Hey, the code's out there, if you wanted, *YOU* could start the CVS for this code too. Anyting is possible.

    Cheers,
    Louie

    http://linux.redbird.com/~alien88/sbfactor125source.zip
    Last edited by Alien88; 03-18-2004 at 12:14 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •