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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,53a571639ed0bc5a X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news3.google.com!feeder1-2.proxad.net!proxad.net!feeder2-2.proxad.net!newsfeed.arcor.de!newsspool2.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: Dynamic functions Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: <46bb3919$0$19890$edfadb0f@dread11.news.tele.dk> <6sdjo0lxt0xs.1ep1p45e58zk2$.dlg@40tude.net> <46bc7afa$0$172$edfadb0f@dread11.news.tele.dk> Date: Fri, 10 Aug 2007 20:56:39 +0200 Message-ID: NNTP-Posting-Date: 10 Aug 2007 20:56:34 CEST NNTP-Posting-Host: dae1a546.newsspool2.arcor-online.net X-Trace: DXC=S8gl3XKM6QZf8j24CD<3lPA9EHlD;3YcR4Fo<]lROoRQ<`=YMgDjhgRH0>9A95b?8^[6LHn;2LCV^[ On Fri, 10 Aug 2007 16:59:45 +0200, Poul-Erik Andreasen wrote: >> Execution includes elaboration of the code. In your case elaboration would >> mean to call the compiler, to link the DLL, to load the DLL. How frequent >> the given function F will be called per run? If you are not going to design >> some image rendering/processing system with millions of calls per function, >> it probably will not pay off. > > In my case wee are in fact talking about several million calls per > function. Jacob have bee proposing this model to me before, but i find i > a bit to cumbersome. By the way it is not images it is timeseries I see, it is basically same pattern. But if you have many small functions to call over a large grid of data, the function call overhead becomes a problem on all those pipelined processors with cache etc. I guess that you could give a try to dense interpretable code. In end effect it might turn faster than calls to compiled subprograms from a DLL. As a guess, there is a third variant. You can try to pass the data container to a DLL subprogram rather than individual elements of. Instead of passing a function to some iterator, you can pass the iterator to the function. I.e. you could try to vectorize your elementary operations. This might be hard or impossible, though. It looks quite interesting. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de