Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > parallel computing

Reply
Thread Tools

parallel computing

 
 
Sori Schwimmer
Guest
Posts: n/a
 
      04-25-2006
Hi All,

While working on a project, I discovered lots of
little opportunities for real parallelism. For
instance, the following class initialization:

from pg import DB

class example:
def __init__(self):
# find somehow HOST1, HOST2

self.member1=DB('database1',host=HOST1).query("SEL ECT...").getresult()
self.member2=self.my_aux_func()
# some more processing here

self.member3=DB('database1',host=HOST2).query("SEL ECT...").getresult()
# other things here

will ask other physical computers to do some of the
work... and wait for the results.

Wouldn't be nice, in the spirit of occam (the
language) to do it like the following?

from pg import DB

class example:
def __init__(self):
# find somehow HOST1, HOST2
par:

self.member1=DB('database1',host=HOST1).query("SEL ECT...").getresult()
seq:
self.member2=self.my_aux_func()
# some more processing here

self.member3=DB('database1',host=HOST2).query("SEL ECT...").getresult()
# other things here

I know, we have thread(s), but is not the same. Things
built in the language are faster, as they are
C-compiled rather than Python-interpreted. The syntax
is pretty simple and expressive. It simply gives, IMO,
more power to the programmer.

Is it worth for a PEP?

Regards,
Sorin Schwimmer

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Optical Computing: special issue - Natural Computing, Springer optical supercomputing C Programming 0 01-16-2009 12:18 PM
Optical Computing: special issue - Natural Computing, Springer optical supercomputing C Programming 0 12-19-2008 12:22 PM
Call for Papers Reminder: The2007 International Conference of Parallel and Distributed Computing (ICPDC 2007) imecs___2007@iaeng.org Java 0 02-15-2007 09:44 AM
Call for Papers: The2007 International Conference of Parallel and Distributed Computing (ICPDC 2007) imecs_2007@iaeng.org Java 0 01-22-2007 09:17 AM
Razer Tarantula Gaming Keyboard Review at XYZ Computing at XYZ Computing Silverstrand Front Page News 0 11-01-2006 05:13 PM



Advertisments