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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,99210dd26e04d959 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,UTF8 Path: g2news2.google.com!news3.google.com!feeder.news-service.com!94.75.214.39.MISMATCH!aioe.org!not-for-mail From: =?utf-8?Q?Yannick_Duch=C3=AAne_=28Hibou57?= =?utf-8?Q?=29?= Newsgroups: comp.lang.ada Subject: Re: Loops and parallel execution Date: Wed, 26 Jan 2011 02:06:57 +0100 Organization: Ada @ Home Message-ID: References: <4d3eeef7$0$6879$9b4e6d93@newsspool2.arcor-online.net> <4d3f0a1d$0$6993$9b4e6d93@newsspool4.arcor-online.net> <1ge2i0esmav4i$.1jv4tflkkh9rf.dlg@40tude.net> NNTP-Posting-Host: hEU2u2p+epy4vJZ3kbr/QQ.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes Content-Transfer-Encoding: Quoted-Printable X-Complaints-To: abuse@aioe.org X-Notice: Filtered by postfilter v. 0.8.2 User-Agent: Opera Mail/11.00 (Win32) Xref: g2news2.google.com comp.lang.ada:17665 Date: 2011-01-26T02:06:57+01:00 List-Id: Le Tue, 25 Jan 2011 22:32:57 +0100, Dmitry A. Kazakov = a =C3=A9crit: > On Tue, 25 Jan 2011 18:36:29 +0100, Georg Bauhaus wrote: > >> If a compiler detects two independent paths inside a loop, > > I don't see any application for this. Can you remember the last time y= ou > wrote such loop? I cannot. I can see one: a kind of compiler optimization. I use to though about = something similar to what Georg exposed (except not strictly with loops)= , = which I called =E2=80=9Cmicro-parallelism=E2=80=9D. There are many case = in an application = where some short sequence of instructions or groups of instructions does= = not need to be sequenced. Typically I notice this when I do not know whi= ch = order to give these to make the source clear, as many orders would be = equivalent. Unfortunately, tasking is inefficient here (too much = overhead). You talked about Occam which I do not know (just the = principle), but could be fine, yes. This kind of parallelism requires to be handled at low level (CPU or = else). This could be either marked explicitly by the author or detected = by = the compiler as Georg suggested, as a kind of compiler optimization. -- = Si les chats miaulent et font autant de vocalises bizarres, c=E2=80=99es= t pas pour = les chiens. =E2=80=9CI am fluent in ASCII=E2=80=9D [Warren 2010]