LITTLEBLACKDOG.COM Forum Index LITTLEBLACKDOG.COM

 
LWD LWD   FAQ FAQ   Memberlist Memberlist   Usergroups Usergroups   Active Topics Active Topics   Register Register  
  Profile Profile   Log in to check your private messages Log in to check your private messages   Log in Log in  
  Who is Online Who is Online   Image Gallery Image Gallery   Chat Chat   Search Search  
  LWDGear       LBDGear  

View next topic
View previous topic
Post new topic     Reply to topic   LITTLEBLACKDOG.COM Forum Index » Code Warriors
Author Message
hummer010
Moderator
Moderator


Joined: 02 Nov 2000
Age: 32
Posts: 4607
Location: Right here!

Post Posted: Thu Sep 20, 2007 10:03 am   Post subject: Parallel Programming in Python Reply with quote Back to top  

I just recently was introduced to the Parallel Python module, and I have to say, it rocks!

I have an application that iterates through 18,000 objects, performs a somewhat complex computation on each one and then inserts the results into a postgres database. I add some lines of code to time the process and ran it. It completed in 39 minutes.

I then spent about 20 minutes (and half of that was due to my own ignorance) adapting the application to run in parallel using the pp module. I have a dual core machine, so I set the job_server to 2 workers, and ran the application again. It completed in 23 minutes. Even with the time adapting the code it was faster than the original sequential application. On a dual dual-core machine it would be even faster as I could use 4 workers.

Colour me impressed!

_________________
---------------------------
Where are you?



...remember second place is really only first loser!
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic     Reply to topic

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2002 phpBB Group
phpBB SEO
All times are GMT - 8 Hours

Help us keep advertisements off this site. Donate today!