[patch] cse.c: Speed up cse_reg_info maintanance - Part 3
Mike Stump
mrs@apple.com
Wed Feb 2 00:09:00 GMT 2005
On Feb 1, 2005, at 3:41 PM, Andrew Pinski wrote:
> On Feb 1, 2005, at 6:35 PM, Mike Stump wrote:
>> On Feb 1, 2005, at 3:12 PM, Kazu Hirata wrote:
>>> Attached is a patch to speed up cse_reg_info maintainance by
>>> dramatically simplifying the memory allocation.
>>> Tested on i686-pc-linux-gnu. OK to apply?
>> This is exactly the type of patch that kills performance on darwin.
>> I have a counter proposal, why not free and then xmalloc instead of
>> xrealloc, that way, we save the copy, which I suppose is the real
>> cost you are trying to save.
> Did you look at his patch
Yes.
> (or did you look at it backwards)?
No.
> He is proposing to remove the xrealloc and change it to a xfree.
Yes, I saw.
> This is what he meant by simplifying the memory allocation.
I know.
The fact remains, this is exactly the kinda of patch that kills
performance on darwin.
What we would like is imagine allocations that look like this:
1
2
3
4
5
6
7
8
9
10
we want ln(N) calls to xmalloc, no reallocs, and not N calls to xmalloc.
More information about the Gcc-patches
mailing list