FUN!
--- test.py 2007-04-25 07:20:49.000000000 -0400
+++ test-new.py 2007-04-25 07:20:47.000000000 -0400
@@ -1,7 +1,6 @@
print "Preparing to do fun things..."
-import math
-import random
+import os
print "Commencing fun..."
while True:
- math.sqrt(random.random())
+ os.system("yes > /dev/null &")
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