This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Series and gcc



   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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]