From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,4cf1fd41f64f8f02 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local01.nntp.dca.giganews.com!nntp.comcast.com!news.comcast.com.POSTED!not-for-mail NNTP-Posting-Date: Sat, 03 Jun 2006 15:40:51 -0500 From: tmoran@acm.org Newsgroups: comp.lang.ada Subject: Re: task-safe hash table? References: X-Newsreader: Tom's custom newsreader Message-ID: <9ZudndYoBv9JbhzZRVn-ig@comcast.com> Date: Sat, 03 Jun 2006 15:40:52 -0500 NNTP-Posting-Host: 67.169.16.3 X-Trace: sv3-X5EvkZ1Z4oc7/xGa3zOJ7u+saH1zU6DCVuRDKGqtVbRtx+KGqA79OxNAan7nkzwUbAincyhxBjAR1Uj!vjUDfdpXseoqjUG/Oqd81MZhu8jSSJHHcLWDxP0lABpxnf3nKiQenn7bzI+vqno/k7UBcOqyARQ= X-Complaints-To: abuse@comcast.net X-DMCA-Complaints-To: dmca@comcast.net X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.32 Xref: g2news2.google.com comp.lang.ada:4665 Date: 2006-06-03T15:40:52-05:00 List-Id: > >What about a window in which each task makes, say, n searches. n is the > >window size. All misses are postponed till the window end. At that point > ... > Perhaps a windowing or batching approach such as you suggest would > distribute the Protected overhead over more useful work and make the > concurrent approach faster. I'll look into that this weekend. Dual tasking takes 2/3 as long as sequential. The k-nucleotide strings start half the time with 'A' or 'C' and half the time with 'G' or 'T'. So I tried using one hash table for the former and one for the latter. Then there is no synchronization needed (till printing the results). Running with the main program handling A+C and a second task concurrently handling G+T drives CPU usage up to 96% and takes 2/3 the wall clock time, as compared to doing A+C followed sequentially by G+T (which only takes CPU usage up to 50%, or all of one core on this dual-core Pentium). So Ada multitasking on a multi-core CPU gives substantial improvements for another of the shootout benchmarks (which I believe, unfortunately, are officially measured on obsolete single-core CPUs).