[BangPypers] Multiprocessing takes higher execution time

Amit k. Saha amitsaha.in at gmail.com
Wed Jan 7 10:52:24 CET 2009


On Wed, Jan 7, 2009 at 3:10 PM, Sibtey Mehdi <sibteym at infotechsw.com> wrote:
> Hi,
>
>
>
> I use multiprocessing to compare more then one set of files.
>
> For comparison each set of files (i.e. Old file1 Vs New file1) I create a
> process,
>
> Process(target=compare, args=(oldFile, newFile)).start()
>
> It takes 61 seconds execution time.
>
>
>
> When I do the same comparison without implementing multiprocessing, it takes
> 52 seconds execution time.
>
>
>
> The parallel processing time should be lesser.
>
>
>
> I am not able to get advantage of multiprocessing here.

Depends on the overheads of spawning multiple threads/processes v$
your actual processing. The same way, things are compared in old
school when they used to compare macros v$ functions in C/C++.

-Amit


>
>
>
> Any suggestions can be very helpful.
>
>
>
> Thanks,
>
> Gopal
>
>
>
>
>
>
>
> _______________________________________________
> BangPypers mailing list
> BangPypers at python.org
> http://mail.python.org/mailman/listinfo/bangpypers
>
>



-- 
Amit Kumar Saha
http://amitksaha.blogspot.com
http://amitsaha.in.googlepages.com/
Skype: amitkumarsaha


More information about the BangPypers mailing list