Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.forth > #20420
| Newsgroups | comp.lang.forth |
|---|---|
| Date | 2013-03-07 16:07 -0800 |
| References | <ef18d174-b46c-42e1-9a23-22ae22a90e0c@googlegroups.com> <79911496008434@frunobulax.edu> |
| Message-ID | <c098b700-1987-413f-bcb6-e40426740a7a@googlegroups.com> (permalink) |
| Subject | Re: pde2 floating point benchmark code |
| From | krishna.myneni@ccreweb.org |
On Thursday, March 7, 2013 1:12:56 PM UTC-6, Marcel Hendrix wrote: > krishna.myneni@ccreweb.org writes Re: pde2 floating point benchmark code > > [..] > > >>> The Fortran code is compiled and used transparently, and > > >>> the speedup is enormous. Native code Forth compilers could use this > > >>> hybrid R program for comparison. The link is > > >>> ftp://ccreweb.org/software/R/pde/diffusion-fast.R > > > > > >> Compare what to what? > > > > > I meant, compare the execution time of the R program's calculation > > > (for diffusion-fast.R) with the execution time of the compiled Forth program ... > > > > Can you quote numbers? I don't have R installed. > > [..] > I'll have to figure out the timing words used to benchmark code in R and get back with you on that. Your run times look pretty efficient (what's your hardware?). > > The method of lines calculation program may be found at > > > > > ftp://ccreweb.org/software/R/pde/pde-example.R > > > > > It outputs a rather nice color image of the spatial-temporal solution, and > > > worth looking at if you have installed or can install R on your system. > > > > Could you post a picture? I can't read the R syntax to do it with my native > > plotters :-) > > The image may be found at, http://ccreweb.org/documents/programming/pde-example.png It's a 2-D grid, with discrete times in the interval (1, 100) along one axis, and discrete positions in the interval (0, 10) along the other axis. The value of u(x,t) is mapped to a color. One physical problem that maps to the PDE is that of a metal rod, starting out at a low uniform temperature, and then held at a fixed higher temperature at one end, and insulated at the other end. Then, u(x, t) is the temperature at a given position and time. The image shows the heat diffusing from one end to the other. The diffusion coefficient, D, represents the thermal conductivity of the material. There are, of course, other types of physical problems represented by the same 1-D diffusion equation. > > >> ( 50% of the time is needed to copy the arrays around ) > > > > More like 25% for the fast floating-point < 80 bits. > > > > > Not sure how to get around this problem. Even though the calculation might > > > be done in-place with some extra variables, I don't know if the memory > > > shuffling can be minimized significantly. > > > > Swapping pointers works. > > Ok. Thanks. My implementation of pointers actually slows down the code when I use pointer swapping instead of copying memory. However, I get a significant speedup if I don't use indexed array access, but just manipulate a pointer. The code becomes less transparent though. > > -marcel > > Krishna
Back to comp.lang.forth | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
pde2 floating point benchmark code krishna.myneni@ccreweb.org - 2013-03-04 18:02 -0800
Re: pde2 floating point benchmark code Mark Wills <markrobertwills@yahoo.co.uk> - 2013-03-04 23:23 -0800
Re: pde2 floating point benchmark code krishna.myneni@ccreweb.org - 2013-03-05 05:22 -0800
Re: pde2 floating point benchmark code Doug Hoffman <glidedog@gmail.com> - 2013-03-05 12:11 -0500
Re: pde2 floating point benchmark code krishna.myneni@ccreweb.org - 2013-03-05 16:11 -0800
Re: pde2 floating point benchmark code Doug Hoffman <glidedog@gmail.com> - 2013-03-06 04:26 -0500
Re: pde2 floating point benchmark code krishna.myneni@ccreweb.org - 2013-03-06 05:22 -0800
Re: pde2 floating point benchmark code Doug Hoffman <glidedog@gmail.com> - 2013-03-06 09:44 -0500
Re: pde2 floating point benchmark code krishna.myneni@ccreweb.org - 2013-03-05 16:17 -0800
Re: pde2 floating point benchmark code mhx@iae.nl (Marcel Hendrix) - 2013-03-06 23:06 +0200
Re: pde2 floating point benchmark code krishna.myneni@ccreweb.org - 2013-03-07 04:57 -0800
Re: pde2 floating point benchmark code m.a.m.hendrix@tue.nl - 2013-03-07 05:49 -0800
Re: pde2 floating point benchmark code mhx@iae.nl (Marcel Hendrix) - 2013-03-07 21:12 +0200
Re: pde2 floating point benchmark code krishna.myneni@ccreweb.org - 2013-03-07 16:07 -0800
Re: pde2 floating point benchmark code Doug Hoffman <glidedog@gmail.com> - 2013-03-10 09:17 -0400
Re: pde2 floating point benchmark code mhx@iae.nl (Marcel Hendrix) - 2013-03-10 18:33 +0200
Re: pde2 floating point benchmark code Doug Hoffman <glidedog@gmail.com> - 2013-03-11 04:54 -0400
Re: pde2 floating point benchmark code humptydumpty <ouatubi@gmail.com> - 2013-03-07 22:32 -0800
Re: pde2 floating point benchmark code Krishna Myneni <krishna.myneni@ccreweb.org> - 2013-03-08 05:19 -0800
Re: pde2 floating point benchmark code mhx@iae.nl (Marcel Hendrix) - 2013-03-08 21:04 +0200
Re: pde2 floating point benchmark code Krishna Myneni <krishna.myneni@ccreweb.org> - 2013-03-08 16:31 -0800
Re: pde2 floating point benchmark code Zbiggy <zbigniew2011REMOVE@gmail.REMOVE.com> - 2013-03-09 00:56 +0000
Re: pde2 floating point benchmark code Krishna Myneni <krishna.myneni@ccreweb.org> - 2013-03-08 19:52 -0800
Re: pde2 floating point benchmark code Zbiggy <zbigniew2011REMOVE@gmail.REMOVE.com> - 2013-03-09 09:09 +0000
Re: pde2 floating point benchmark code mhx@iae.nl (Marcel Hendrix) - 2013-03-09 13:37 +0200
Re: pde2 floating point benchmark code Krishna Myneni <krishna.myneni@ccreweb.org> - 2013-03-09 06:28 -0800
Re: pde2 floating point benchmark code mhx@iae.nl (Marcel Hendrix) - 2013-03-09 17:58 +0200
Re: pde2 floating point benchmark code humptydumpty <ouatubi@gmail.com> - 2013-03-08 12:23 -0800
Re: pde2 floating point benchmark code Krishna Myneni <krishna.myneni@ccreweb.org> - 2013-03-08 16:43 -0800
csiph-web