mersenneforum.org  

Go Back   mersenneforum.org > Great Internet Mersenne Prime Search > Software

Reply
 
Thread Tools
Old 2004-02-24, 03:13   #1
Citrix
 
Citrix's Avatar
 
Jun 2003

1,579 Posts
Default Trial factoring

I am looking for the trial factoring code used in Prime95. Could some one point me to the file that contains the code for this, in the Prime95 source release.

Thanks,
Citrix
Citrix is offline   Reply With Quote
Old 2004-02-24, 03:34   #2
nfortino
 
nfortino's Avatar
 
Nov 2003

A516 Posts
Default

Quote:
Originally Posted by Citrix
I am looking for the trial factoring code used in Prime95. Could some one point me to the file that contains the code for this, in the Prime95 source release.

Thanks,
Citrix
As far as I can tell, for Prime95 in the version 23 source, factor64.asm, not that I can read any line that doesn't begin with a colon.
nfortino is offline   Reply With Quote
Old 2004-02-24, 05:24   #3
Citrix
 
Citrix's Avatar
 
Jun 2003

1,579 Posts
Default

I know C/C++ and other high level languages but unfortunately not assembly. Anyway, is there some other way I could use trial factoring code that is as fast as Prime95.

If anyone can provide me with some code that would be great.
I am sieving a series similar to mersenne,in the form of the factors.

Citrix
Citrix is offline   Reply With Quote
Old 2004-02-24, 12:02   #4
ET_
Banned
 
ET_'s Avatar
 
"Luigi"
Aug 2002
Team Italia

10010110011102 Posts
Default

Quote:
Originally Posted by Citrix
is there some other way I could use trial factoring code that is as fast as Prime95?
Not that I am aware of...

Even using GMP library with -O3 optimizations, the resulting code would be less than 45% as efficient.

Luigi
ET_ is offline   Reply With Quote
Old 2004-02-24, 19:49   #5
PrimeCruncher
 
PrimeCruncher's Avatar
 
Sep 2003
Borg HQ, Delta Quadrant

2·33·13 Posts
Default

Quote:
Originally Posted by Citrix
I know C/C++ and other high level languages but unfortunately not assembly. Anyway, is there some other way I could use trial factoring code that is as fast as Prime95.
I believe there is a way in C/C++ to do in-line assembly, though I don't do any work in either language.
PrimeCruncher is offline   Reply With Quote
Old 2004-02-25, 01:21   #6
rogue
 
rogue's Avatar
 
"Mark"
Apr 2003
Between here and the

18AA16 Posts
Default

That depends entirely upon the compiler. Visual C++ does support inline assembly. gcc is an entirely different matter.
rogue is offline   Reply With Quote
Old 2004-02-25, 08:35   #7
ET_
Banned
 
ET_'s Avatar
 
"Luigi"
Aug 2002
Team Italia

10010110011102 Posts
Default

Quote:
Originally Posted by rogue
That depends entirely upon the compiler. Visual C++ does support inline assembly. gcc is an entirely different matter.
Also gcc does, but it has AT&T Assembly style, not INTEL.

Luigi
ET_ is offline   Reply With Quote
Old 2004-02-26, 03:24   #8
cheesehead
 
cheesehead's Avatar
 
"Richard B. Woods"
Aug 2002
Wisconsin USA

22×3×641 Posts
Default

Quote:
Originally Posted by Citrix
I know C/C++ and other high level languages but unfortunately not assembly. Anyway, is there some other way I could use trial factoring code that is as fast as Prime95.
The reason Prime95's trial factoring code is so fast is that it takes advantage of certain features and properties of Intel CPU instruction operations that are not able to be accessed by existing high-level languages. If you want code that is just as fast as Prime95's, you (or someone else) also will have to use assembly language (or else invent a new high-level language that allows doing what the assembly language allows doing). :-)
cheesehead is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
What is Trial Factoring? Unregistered Information & Answers 5 2012-08-02 03:47
How much Trial Factoring to do? odin Software 4 2010-08-08 20:23
How far to do trial factoring S485122 PrimeNet 1 2007-09-06 00:52
How to only do Trial Factoring? michael Software 23 2004-01-06 08:54
About trial factoring gbvalor Math 4 2003-05-22 02:04

All times are UTC. The time now is 03:37.

Tue May 18 03:37:33 UTC 2021 up 39 days, 22:18, 0 users, load averages: 3.50, 2.66, 2.53

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.