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]
Other format: [Raw text]

Re: [patch] cse.c: Speed up cse_reg_info maintainance - Part 2


Geert Bosch wrote:

Growing the table by anything else than a constant factor will
result in quadratic behavior.

Hmm. How so? This allocation happens twice per function in the worst case. This worst case can be triggered with both strategies.


> It's not so bad to allocate a bit too
much VM, as long as we don't touch more memory than we need to.

You do have a point there. Kazu, if you change the patch to initialize [previous_maxreg .. current_maxreg] instead of [old_size .. new_size], it's OK too.



Bernd



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