tag:blogger.com,1999:blog-29331675.post8475315082711031049..comments2024-03-05T17:37:00.995+01:00Comments on The Delphi Geek: Divide and Conquer (in parallel)gabr42http://www.blogger.com/profile/06903558857617342477noreply@blogger.comBlogger4125tag:blogger.com,1999:blog-29331675.post-59840443265904299402011-12-12T16:09:13.551+01:002011-12-12T16:09:13.551+01:00This is entirely expected. Tree scanning and findi...This is entirely expected. Tree scanning and finding a maximum element are such simple algorithms that it's hard to beat singlethreaded speed with the multithreaded application.gabr42https://www.blogger.com/profile/06903558857617342477noreply@blogger.comtag:blogger.com,1999:blog-29331675.post-89042579498423749452011-12-12T14:42:44.943+01:002011-12-12T14:42:44.943+01:00I have a Phenom II t1100 X6 8gb windows 7 and delp...I have a Phenom II t1100 X6 8gb windows 7 and delphi x2 update 1<br />Im compile the test first<br />app_44_Fork Join QuickSort<br />and result is <br />Generating 10000000 pseudorandom numbers<br />Sequential sorted in 8607 ms<br />Parallel sorted in 664 ms<br />This test is good parallel is better but<br />the test <br />app_45_Fork Join Max<br />Generating 10000000 pseudorandom numbers<br />Sequential max=2147483447 found in 52 ms<br />Parallel max=2147483447 found in 186 ms<br />i dont undertand why sequential is better in my phenom x6 who is wrong<br />the app_34_TreeScan is the same situation sequential found in 20ms and parallel found in 886msHernannoreply@blogger.comtag:blogger.com,1999:blog-29331675.post-60965908143418089632011-10-23T10:00:25.191+02:002011-10-23T10:00:25.191+02:00The only benchmarks are tests 44_Fork-Join QuickSo...The only benchmarks are tests 44_Fork-Join QuickSort and 45_Fork-Join max. From them you can see that overhead is quite large as it takes a 8-core machine to QuickSort 10-million numbers faster than a single-threaded algorithm. I do not recommend using Fork/Join for something so "trivial" as QuickSort. You should use it on a problem with more CPU-intensive calculations in a workload.<br /><br />As for the memory manager - I don't know. FastMM is the only stable and free memory manager and that's why I'm sticking to it.gabr42https://www.blogger.com/profile/06903558857617342477noreply@blogger.comtag:blogger.com,1999:blog-29331675.post-67777898748035756512011-10-23T06:37:49.294+02:002011-10-23T06:37:49.294+02:00Do you have any benchmarks for these examples? How...Do you have any benchmarks for these examples? How fast can parallel versions of classic algs be? How large are overheads? How good this scale on 2/4/etc CPUs? And what about Delphi memory manager? FastMM is not scale well for multi-threading. Does it affect your examples?Anonymousnoreply@blogger.com