Hello

Welcome, Guest. Please login or register.
Did you miss your activation email?

Author Topic: How fast can your box identify prime numbers?  (Read 818 times)

Offline Avatarr
  • Wise Member

  • Hero Member
  • *****
  • Posts: 1647
  • Karma: +10/-0
    • http://www.sheepsheet.com
How fast can your box identify prime numbers?
« on: January 26, 2003, 06:51:20 PM »
One day, I wanted a list of all the prime numbers between 99999 and 1. I thought this operation wouldn\'t take /that/ long, but it can take a noticable amount of time. This\'d be an interesting twist on the 3dMark contests you may have had in the past. :p

Download the binary from here:
http://homepages.ihug.com.au/~lagunad/plgen/plgen.htm
(click on PLGEN Binary on the side bar)

And then tell us ur results. I\'m not sure why, but it does get a tad faster each time you run the .exe . Prolly all the branch prediction stuff working along. So for consistency\'s sake, only post your results for the first run.

Me:
157 seconds on the first run.

Offline Mr. Kennedy
  • Resident Libertarian
  • Legendary Member
  • ******
  • Posts: 9110
  • Karma: +10/-0
How fast can your box identify prime numbers?
« Reply #1 on: January 26, 2003, 07:54:02 PM »
I actually wrote a program that can do that for you, I\'ll show you my personal version tomorrow.

I\'m a better programmer :)
\"In the last 12 months 100,000 private sector jobs have been lost and yet you\'ve created 30,000 public sector jobs. Prime Minister, you cannot carry on forever squeezing the productive bit of the economy in order to fund an unprecidented engorgement of the unproductive bit. You cannot spend your way out of recession or borrow your way out of debt.\" - Daniel Hannan

Follow Me on Twitter!

Offline Avatarr
  • Wise Member

  • Hero Member
  • *****
  • Posts: 1647
  • Karma: +10/-0
    • http://www.sheepsheet.com
How fast can your box identify prime numbers?
« Reply #2 on: January 26, 2003, 08:10:58 PM »
If its already written, u can post the source code here. :p

Offline Mr. Kennedy
  • Resident Libertarian
  • Legendary Member
  • ******
  • Posts: 9110
  • Karma: +10/-0
How fast can your box identify prime numbers?
« Reply #3 on: January 26, 2003, 08:49:29 PM »
what language you using, mine is written in Java.

But my program is at school so I\'ll have to wait til tomorrow.  I have several programs that are very effective, I\'ll be moving on to something new on Monday.
\"In the last 12 months 100,000 private sector jobs have been lost and yet you\'ve created 30,000 public sector jobs. Prime Minister, you cannot carry on forever squeezing the productive bit of the economy in order to fund an unprecidented engorgement of the unproductive bit. You cannot spend your way out of recession or borrow your way out of debt.\" - Daniel Hannan

Follow Me on Twitter!

Offline Avatarr
  • Wise Member

  • Hero Member
  • *****
  • Posts: 1647
  • Karma: +10/-0
    • http://www.sheepsheet.com
How fast can your box identify prime numbers?
« Reply #4 on: January 26, 2003, 09:03:25 PM »
C++

I\'ll bet its slower just given the fact that its written in Java, even if you did use the Euclidian Algorithm. Did u use the Euclidian Algorithm, btw. Why do you claim its "better"? Can u tell us a little bit about your "better" program?

Offline videoholic

  • Silly little freak
  • Legendary Member
  • ******
  • Posts: 18034
  • Karma: +10/-0
How fast can your box identify prime numbers?
« Reply #5 on: January 27, 2003, 04:33:40 AM »
192 seconds.  I suck.

I do like the naked picture of Tyra Banks at the end. Nice touch.
I wear a necklace now because I like to know when I\'m upside down.
 kopking: \"i really think that i how that guy os on he weekend\"
TheOmen speaking of women: \"they\'re good at what they do, for what they are.\"
Swifdi:

Offline Avatarr
  • Wise Member

  • Hero Member
  • *****
  • Posts: 1647
  • Karma: +10/-0
    • http://www.sheepsheet.com
How fast can your box identify prime numbers?
« Reply #6 on: January 27, 2003, 04:52:42 AM »
:)

Offline §ôµÏG®ïñD

  • ñµñ©Håkµ må§tË®
  • Global Moderator
  • Legendary Member
  • ******
  • Posts: 9682
  • Karma: +10/-0
  • Ǧµî✟å® Ĵµñķîë
    • §ôµÏG®ïñD'§ Electrical / Electronics shit.
  • PSN ID: SoulGrind81
How fast can your box identify prime numbers?
« Reply #7 on: January 27, 2003, 05:54:07 AM »
156 seconds for me..
  Ǧµî✟å® Ĵµñķîë!!  

Offline Kurt Angle

  • Administrator
  • Legendary Member
  • ******
  • Posts: 7923
  • Karma: +10/-0
  • PSN ID: Supes1975
How fast can your box identify prime numbers?
« Reply #8 on: January 27, 2003, 08:32:23 AM »
I set it going 10 mins ago, its just past the half way mark.

EDIT: the second half was much quicker, total time 1140 secs!:laughing:
« Last Edit: January 27, 2003, 08:36:29 AM by Kurt Angle »

Offline Tyrant
  • Hero Member
  • *****
  • Posts: 1877
  • Karma: +10/-0
    • http://www.bahrainicars.com
How fast can your box identify prime numbers?
« Reply #9 on: January 27, 2003, 09:00:01 AM »
155 seconds.
did i win ;).
[size=1.5]It is a mistake to try to look too far ahead. The chain of destiny can only be grasped one link at a time.~Sir Winston Churchill[/size]
Bahrains ultimate vehicle showroom,  CV8=ownage, Bahrain F1, Bahraini cars, GulfGt.

Offline Mr. Kennedy
  • Resident Libertarian
  • Legendary Member
  • ******
  • Posts: 9110
  • Karma: +10/-0
How fast can your box identify prime numbers?
« Reply #10 on: January 27, 2003, 04:08:50 PM »
bah you guys suck

102 seconds!!!!!!
\"In the last 12 months 100,000 private sector jobs have been lost and yet you\'ve created 30,000 public sector jobs. Prime Minister, you cannot carry on forever squeezing the productive bit of the economy in order to fund an unprecidented engorgement of the unproductive bit. You cannot spend your way out of recession or borrow your way out of debt.\" - Daniel Hannan

Follow Me on Twitter!

Offline Avatarr
  • Wise Member

  • Hero Member
  • *****
  • Posts: 1647
  • Karma: +10/-0
    • http://www.sheepsheet.com
How fast can your box identify prime numbers?
« Reply #11 on: January 27, 2003, 04:15:27 PM »
Quote
Originally posted by Kurt Angle
I set it going 10 mins ago, its just past the half way mark.

EDIT: the second half was much quicker, total time 1140 secs!:laughing:


:D yes. The primality checker thingy goes through each number between the number itself down to 1, seeing if there\'s a number in there that is a factor. I\'ve been told that you only need to start checking from the square root of the number. (sounds fairly reasonable). And that Euclidian Algorithm puts it down to just a bearable number of steps. :p

But sif you\'d trade efficiency for a total time of 1140 secs!!

Still waiting for that little program of urs Hurri. HURRY :D :p
(pun intended)

Offline THX
  • nigstick
  • Legendary Member
  • ******
  • Posts: 8158
  • Karma: +10/-0
How fast can your box identify prime numbers?
« Reply #12 on: January 27, 2003, 08:05:25 PM »
p2.4b oc\'ed to 2.7 for this test & 3dmark.

83 sec

\"i thought america alreay had been in the usa??? i know it was in australia and stuff.\"
-koppy *MEMBER KOPKING FANCLUB*
\"I thought japaneses where less idiot than americans....\" -Adan
\"When we can press a button to transport our poops from our colon to the toilet, I\'ll be impressed.\" -Gman

Offline Avatarr
  • Wise Member

  • Hero Member
  • *****
  • Posts: 1647
  • Karma: +10/-0
    • http://www.sheepsheet.com
How fast can your box identify prime numbers?
« Reply #13 on: January 28, 2003, 04:24:08 AM »
Gee THX, that\'s really really fast! Let\'s see if anyone can break the 60 seconds barrier! But while we\'re on the subject of fast, lets jump to the subject of slow. Hurricane is really taking his time with that program of his. :p Just thought I\'d put in a reminder. :)

Offline Mr. Kennedy
  • Resident Libertarian
  • Legendary Member
  • ******
  • Posts: 9110
  • Karma: +10/-0
How fast can your box identify prime numbers?
« Reply #14 on: January 28, 2003, 04:43:50 AM »
well I didn\'t go to school yesterday cause I was sick and thats where my program is.

it doesn\'t do 1 to 9999, it does 1 to n where n can be any number greater than 1, I\'ll post it today when I get the chance.
\"In the last 12 months 100,000 private sector jobs have been lost and yet you\'ve created 30,000 public sector jobs. Prime Minister, you cannot carry on forever squeezing the productive bit of the economy in order to fund an unprecidented engorgement of the unproductive bit. You cannot spend your way out of recession or borrow your way out of debt.\" - Daniel Hannan

Follow Me on Twitter!

 

SMF spam blocked by CleanTalk