Older Contests
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsPHP ContestsOlder Contests

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old March 7th, 2003, 01:42 AM
Vader Vader is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Loveland, OH
Posts: 12 Vader User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via Yahoo to Vader
[DNO] Scoring System Benchmark

Matt,

Can you post a siple loop script that runs for 30 seconds on your Scoring Machine? That way we can benchmark how fast our system is vs. the contest machine.

Thanks

Vader

Reply With Quote
  #2  
Old March 7th, 2003, 01:45 AM
Vader Vader is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Loveland, OH
Posts: 12 Vader User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via Yahoo to Vader
RE: [DNO] Scoring System Benchmark

siple = simple

Reply With Quote
  #3  
Old March 7th, 2003, 01:46 AM
Matt Matt is offline
Moderator
Codewalkers Specialist (4000 - 4499 posts)
 
Join Date: Apr 2007
Location: Florida
Posts: 4,158 Matt User rank is Private First Class (20 - 50 Reputation Level)Matt User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 4 h 10 m 20 sec
Reputation Power: 6
RE: [DNO] Scoring System Benchmark

php Code:
Original - php Code
  1. <?php
  2. $time = time();
  3. while(time() - $time < 30);
  4. ?>



Reply With Quote
  #4  
Old March 7th, 2003, 01:47 AM
Matt Matt is offline
Moderator
Codewalkers Specialist (4000 - 4499 posts)
 
Join Date: Apr 2007
Location: Florida
Posts: 4,158 Matt User rank is Private First Class (20 - 50 Reputation Level)Matt User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 4 h 10 m 20 sec
Reputation Power: 6
RE: [DNO] Scoring System Benchmark

Just kidding...I'll work something up for you. This sounds like a reasonable request...

Reply With Quote
  #5  
Old March 7th, 2003, 01:58 AM
Matt Matt is offline
Moderator
Codewalkers Specialist (4000 - 4499 posts)
 
Join Date: Apr 2007
Location: Florida
Posts: 4,158 Matt User rank is Private First Class (20 - 50 Reputation Level)Matt User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 4 h 10 m 20 sec
Reputation Power: 6
RE: [DNO] Scoring System Benchmark

php Code:
Original - php Code
  1. <?php
  2. function getmicrotime(){
  3.     list($usec, $sec) = explode(" ",microtime());
  4.     return ((float)$usec + (float)$sec);
  5.     }
  6.  
  7. $time_start = getmicrotime();
  8.    
  9. for ($i=0; $i < 26000000; $i++);
  10.  
  11. $time_end = getmicrotime();
  12. $time = $time_end - $time_start;
  13.  
  14. echo "$time seconds";
  15. ?>


That runs right about 30 secounds, give or take a second....


Reply With Quote
  #6  
Old March 7th, 2003, 02:10 AM
pickleman78 pickleman78 is offline
Codewalkers Novice (500 - 999 posts)
 
Join Date: Apr 2007
Location: Dallas,TX,USA
Posts: 582 pickleman78 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
Send a message via AIM to pickleman78
RE: [DNO] Scoring System Benchmark

Wow, thats helpful. A script that runs in 30 seconds on my machine would like run in a second... that took almost 3 minutes to run... wow...

Reply With Quote
  #7  
Old March 7th, 2003, 02:31 AM
Matt Matt is offline
Moderator
Codewalkers Specialist (4000 - 4499 posts)
 
Join Date: Apr 2007
Location: Florida
Posts: 4,158 Matt User rank is Private First Class (20 - 50 Reputation Level)Matt User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 4 h 10 m 20 sec
Reputation Power: 6
RE: [DNO] Scoring System Benchmark

Wow, you must have a slow machine My desktop (a celeron 1Ghz), which is not my scoring machine, runs the script in 18 seconds.....

Reply With Quote
  #8  
Old March 7th, 2003, 03:36 AM
Vader Vader is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Loveland, OH
Posts: 12 Vader User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via Yahoo to Vader
RE: [DNO] Scoring System Benchmark

Thanks Matt!

FYI: Mobil Intel Pentium 3 @ 1GHz = 22.16 Sec

Reply With Quote
  #9  
Old March 7th, 2003, 05:55 AM
xs0 xs0 is offline
Codewalkers Novice (500 - 999 posts)
 
Join Date: Apr 2007
Location: Ljubljana, Slovenia
Posts: 760 xs0 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
RE: [DNO] Scoring System Benchmark

Xeon 2.4GHz: 11.3 seconds... I'd better adjust my time limit to something much less than 30 :/

Reply With Quote
  #10  
Old March 7th, 2003, 06:57 AM
jorgen jorgen is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Hardenberg, Holland<marquee>
Posts: 284 jorgen User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
RE: [DNO] Scoring System Benchmark

Can one say that if this code works in 1/3 of the time (in comparison to the time on Matt's pc), that all code works in 1/3 of the time?

Does anyone understand what I'm saying?

Reply With Quote
  #11  
Old March 7th, 2003, 11:32 AM
fractalbit fractalbit is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 108 fractalbit User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
RE: [DNO] Scoring System Benchmark

My Athlon XP1800+ runs it in 13.6 secs. So that means that i 'll have to optimize my script for this time!

Reply With Quote
  #12  
Old March 7th, 2003, 11:35 AM
fractalbit fractalbit is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 108 fractalbit User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
RE: RE: [DNO] Scoring System Benchmark


Quote:
Can one say that if this code works in 1/3 of the time (in comparison to the time on Matt's pc), that all code works in 1/3 of the time?

Does anyone understand what I'm saying?


Yes i understand what you say but i am not very sure about it. I think as a rough estimate all code will run in 1/3 of the time.

Reply With Quote
  #13  
Old March 7th, 2003, 12:00 PM
mcoder mcoder is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 130 mcoder User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
RE: [DNO] Scoring System Benchmark

Oups, 10.48757 seconds on my P4 2.4Ghz.
I guess I'll have to seriously optimize my program to finish 50x50 grids !

JC

Reply With Quote
  #14  
Old March 7th, 2003, 01:41 PM
zombie zombie is offline
Codewalkers Intermediate (1500 - 1999 posts)
 
Join Date: Apr 2007
Location: serbia
Posts: 1,876 zombie User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 3
RE: [DNO] Scoring System Benchmark

matt. on a totaly unrelated offtopic:

why do you insist on using that function getmicrotime() when it can be done with:

$start=time()+microtime();

...

Reply With Quote
  #15  
Old March 7th, 2003, 03:51 PM
Matt Matt is offline
Moderator
Codewalkers Specialist (4000 - 4499 posts)
 
Join Date: Apr 2007
Location: Florida
Posts: 4,158 Matt User rank is Private First Class (20 - 50 Reputation Level)Matt User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 4 h 10 m 20 sec
Reputation Power: 6
RE: [DNO] Scoring System Benchmark

I guess I just don't like to rely on PHP's ability to convert a string to a float. I'm just used to the strict variables of other languages

Reply With Quote
Reply

Viewing: Codewalkers ForumsPHP ContestsOlder Contests > [DNO] Scoring System Benchmark


Thread Tools