Series and gcc
Igor Markov
imarkov@umich.edu
Thu Jan 25 13:20:00 GMT 2001
Barry,
[Without much thinking] I would guess that most, if not all,
advantages of series in C++ are already taken care of by the
Standard Template Library. Older languages like LISP and more restrictive
languages like Pascal don't seem to have a good analog of STL, but PERL
and Java have related functionalities (but they typically aren't as efficient
as C++ STL).
Take a look at the 3rd edition of Bjarne Stroustrup's book "The C++
Programming Language" or at the Silicon Graphics STL site:
http://www.sgi.com/Technology/STL/
STL can "hide" many loops, compiles, with -O3, into extremely efficient
code (in many cases, more efficient than hand-written loops) and is
actually part of the international C++ standard. The second edition of
Jon Bentley's "Programming Pearls" gives an interesting datapoint:
if you need to sort a large array of integers, STL's sort function can do
this ~35 times than qsort() from stdlibc... As far as I understand, a large
part of this improvement is due to compiler optimizations, rather than a
better algorithm that STL's sort uses.
STL is available, supported by many compilers (g++ included)
and is described in details in many books.
Is there still a need for series?
Igor
--
Igor Markov (734) 936-7829 EECS 2211
http://www.eecs.umich.edu/~imarkov
More information about the Gcc
mailing list