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 itmore 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 MacG4, I only have one processor averaging around 90% fun, and sometimesdropping 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 wayI am going to be able to get both processors up to 100% without usingmultithreading? I figure I should be able to max out at 200% fun on thissystem, but I am stuck here. Any advice? --- James Paige
