octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RFC: Using Standard C++ library components in Octave


From: Mumit Khan
Subject: RFC: Using Standard C++ library components in Octave
Date: Mon, 2 Jul 2001 23:50:51 -0500 (CDT)

[ I'm not subscribed to this list, so please copy me if appropriate ]

This issue of using more of the standard C++ library has been in the back
of my mind for a while now, and probably a good time to see how JWE and 
others feel about replacing Octave's "foundation classes" with C++ library 
components.

Octave was written well before the advent of STL and then the standard
C++ library, and like any long-lived C++ projects, it has tons of code
that have somewhat direct equivalents in the new library. This includes 
various data structures such as lists, etc as well as algorithms such 
as std::sort, std::copy, std::unique, etc.

I believe it will be beneficial in the long run to replace some/most of
Octave's code with equivalent components in the C++ library, if possible.
The only issue I see is with gcc-2.8.x, which used a hacked version of
the original HP STL, but nobody who does C++ should be using 2.8.x
anyway. 

I know that for some of my own older code, the executable code size stayed 
about the same (this was a surprise, given the templates used), and the 
performance actually increased in the process.

Is this something we want to do? If so, it could be a reasonably slow
and incremental process:

1. Make use of the standard algorithms first. liboctave/idx-vector.cc
   for example stands to lose a bit of code if that happens.
2. Replace the data structures -- start with the various list structures
   and go from there.

Regards,
Mumit




reply via email to

[Prev in Thread] Current Thread [Next in Thread]