On Tuesday 22 May 2007 05:27:51 pm Michael L Torrie wrote:
> I've finally had enough experience to know that "re-inventing the
> wheel" is almost always a bad idea (in the narrow sense of
> duplicating library functionality), if you ever want to port your
> code to *any* other platform.  What you may think is a wonderful hack
> or trade-off to get a tiny bit of speed will almost certainly come
> back to bite you down the road.  Also, most generic algorithms are
> already optimized more than you'll be able to do by hand generally
> (barring assembly), particularly in the STL.

I'm sure there are some guidelines somewhere about when to rewrite or 
use generic libraries.  I think that, unless you are writing for an 
embedded platform or have great memory/speed constraints, using a 
generic, well used, well supported library (and Glib falls under this 
category) should be encouraged.  Compilers, linkers and processors are 
usually well tuned and optimized for such reusable code that the 
performance loss due to generic code is generally neglegible.  However, 
the productivity gains for programmers are enormous.

-- 
Alberto Treviño
[EMAIL PROTECTED]
CID Testing Center
Brigham Young University
--------------------
BYU Unix Users Group 
http://uug.byu.edu/ 

The opinions expressed in this message are the responsibility of their
author.  They are not endorsed by BYU, the BYU CS Department or BYU-UUG. 
___________________________________________________________________
List Info: http://uug.byu.edu/cgi-bin/mailman/listinfo/uug-list

Reply via email to