[llvm-commits] PATCH: Fix quadratic behavior in PR12652

Chandler Carruth chandlerc at gmail.com
Fri Jul 6 02:17:37 PDT 2012


Sadly, the linear growth is over taken by some *other* quadratic behavior
if I make the input absurdly large. =/ Anyways, its definitely no longer in
this code. This code now has essentially no performance impact in my
measurements.


On Fri, Jul 6, 2012 at 1:42 AM, Chandler Carruth <chandlerc at gmail.com>wrote:

> It doesn't grow by the size of the input squared, it grows by a constant
> factor of the size of the input, the constant happens to be "2" instead of
> "1". Thus if I double the size of the input, I quadruple the runtime. It
> isn't quadratic unless when I quadruple the size of the input, it
> multiplies the time by 16 (4*4) -- currently it just multiplies it by 8 (2
> * 4).
>
>
> On Fri, Jul 6, 2012 at 1:36 AM, Jay Foad <jay.foad at gmail.com> wrote:
>
>> On 6 July 2012 09:28, Chandler Carruth <chandlerc at gmail.com> wrote:
>> > The performance which was previously quadratic is now roughly linear,
>> but
>> > it's a rather unfortunate linear: 2x. Every doubling of the input size
>> > quadruples the compile time.
>>
>> Then it's quadratic, not linear! Can you explain properly?
>>
>> Thanks,
>> Jay.
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120706/49574c5e/attachment.html>


More information about the llvm-commits mailing list