[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] fun game



you're on a G4? 
break out the velocity engine on that fun. 

On Apr 23, 2007, at 6:45 PM, James Paige wrote:

I am working on a really fun game, but I am having a hard time making it 
more fun. I need some help. Here is the source code so far:

#------------------------------------
print "Preparing to do fun things..."
import math
import random

print "Commencing fun..."
while True:
  math.sqrt(random.random())
#------------------------------------

The trouble is, when I check my processor usage on my dual processor Mac 
G4, I only have one processor averaging around 90% fun, and sometimes 
dropping as low as 86% fun. Does anybody know a more fun operation than 
math.sqrt that I could use to push the fun up to 100%? Is there any way 
I am going to be able to get both processors up to 100% without using 
multithreading? I figure I should be able to max out at 200% fun on this 
system, but I am stuck here. Any advice?

---
James Paige

The information contained in this message may be privileged and confidential. If you are NOT the intended recipient, please notify the sender immediately with a copy to hipaa.security@xxxxxxxx and destroy this message.

Please be aware that email communication can be intercepted in transmission or misdirected. Your use of email to communicate protected health information to us indicates that you acknowledge and accept the possible risks associated with such communication. Please consider communicating any sensitive information by telephone, fax or mail. If you do not wish to have your information sent by email, please contact the sender immediately.