This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: optimization for prefix.c
- To: gcc-patches at gcc dot gnu dot org, law at cygnus dot com
- Subject: Re: optimization for prefix.c
- From: "Mark E." <snowball3 at bigfoot dot com>
- Date: Thu, 18 May 2000 23:58:16 -0400
> > * prefix.c (update_path) [DIR_SEPARATOR_2]: Do not duplicate string >
> if it does not contain DIR_SEPARATOR_2. > (update_path) [DIR_SEPARATOR &&
> !DIR_SEPARATOR_2]: Do not duplicate > string if it does not contain
> DIR_SEPARATOR.
> I don't see that this micro-optimization is really worth the time/effort; what
> made you start looking at this code for optimization purposes?
BTW, I meant "optimizing" as in keeping the memory leakage down. I came
across this as I was looking into how to solve DJGPP's prefix problem. I
happen to think it's always worth it not to leak memory when you don't need
to. I also included this part in the patch that offers a solution to DJGPP's
prefix probem. If you find the rest of that patch acceptable, I will delete
this part.