Dylan And Numeric Programming 
Author Message
 Dylan And Numeric Programming

I have only recently (last week, that is...) started looking into Dylan and
was facinated by its potential.
I couldn't compare its performance with C++ properly as I am currently
unfamiliar with the optimizing tricks of the language.

Does anyone knows what would be the performance penalty for transferring a
numeric type C++ project (very large arrays) to Dylan ? even considering
heavy use of C++ templates ?

Guy



Sat, 24 Feb 2001 03:00:00 GMT  
 Dylan And Numeric Programming


Quote:
>I have only recently (last week, that is...) started looking into Dylan and
>was facinated by its potential.
>I couldn't compare its performance with C++ properly as I am currently
>unfamiliar with the optimizing tricks of the language.

>Does anyone knows what would be the performance penalty for transferring a
>numeric type C++ project (very large arrays) to Dylan ? even considering
>heavy use of C++ templates ?

>Guy

In the best case, there will be no performance penalty :-)

Use of dynamic features will usually slow down your code. But making use
of Dylans "sealing" feature - which is turning of dynamism where you can
rely on on certain data types in your code - might even bring Dylan in
close competition with C++.

Because the Dylan compiler "knows" more about the type structure of your
code it is in a good starting position to optimize your code efficiently.
Maybe even more efficiently than C++ does. But this heavily depends on
the compiler.

If you have Linux, give Gwydion Dylan a try. If you use Windows have a
look at Harlequin's Dylan implementation. I think you'll find a lot of
people here being VERY interested in your results. If you have
implementation questions, post your code!

Tim

---

Surviving The Legacy Age: http://interhemd.prinz.org
PGP Fingerprint: 694F 7F7B F37E 60BE  B175 EF08 E545 DF71



Sun, 25 Feb 2001 03:00:00 GMT  
 Dylan And Numeric Programming


Quote:
> Does anyone knows what would be the performance penalty for transferring a
> numeric type C++ project (very large arrays) to Dylan ? even considering
> heavy use of C++ templates ?

Theoretically speaking, a good Dylan implementation should be able to
match or exceed the performace of C++ in many relevant areas. You'd have
to be careful about not creating too much garbage and using limited
collections whenever possible.

In practice, you'll probably find that existing implementations don't
optimize quite this well. I don't have any numbers for Harlequin Dylan,
but informal tests with Gwydion show a performance penalty relative to C.

For now, it is relatively easy to write numeric operations in C and build
Dylan wrappers.

Cheers,
Eric



Sun, 25 Feb 2001 03:00:00 GMT  
 Dylan And Numeric Programming


Quote:
>Theoretically speaking, a good Dylan implementation should be able to
>match or exceed the performace of C++ in many relevant areas. You'd have
>to be careful about not creating too much garbage and using limited
>collections whenever possible.

Theoretically speaking, it's not the garbage that is the problem, it's the
creation.  That is, if you have a problem where the creation of temporary
data structures is required, a GC-ed system should out-perform a manually
managed (malloc/free) system, because the GC can amortize the recycling
cost over many objects, whereas malloc/free pays a recycle cost on every
object.  A copying GC can also amortize the allocation cost, as can a
malloc/free implementation that does compaction.

Theoretically speaking, limited(<array>, of: <single-float>) is just as
efficient as float[].  (Because the compiler need not maintain run-time
type information for each element of the array, whereas an "unlimited"
array may hold elements of different types.)



Sun, 25 Feb 2001 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Dylan Programming Book and Apple Dylan

2. moving a alpha numeric field to a numeric field

3. Accessing floating point numeric data from a file in a REXX program

4. Books on scientific/numeric programming in Python?

5. numeric difference program

6. Numeric Programming for Everybody

7. Dylan Programming Information

8. Dylan for Web Programming...

9. Socket programming in Dylan

10. An example Dylan program?

11. Dylan browsing program?

12. A big Dylan program

 

 
Powered by phpBB® Forum Software