This is the mail archive of the gcc-patches@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: optimization for prefix.c


>   >   * 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.


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