[PATCH 3/3] Rewrite the MIPS legecy code as MIPS r6 style

YunQiang Su syq at debian.org
Fri May 24 05:29:58 UTC 2019


Torbjörn Granlund <tg at gmplib.org> 于2019年5月24日周五 上午5:01写道:
>
> YunQiang Su <syq at debian.org> writes:
>
>   The r6 style code is much shorter and with the same performance,
>   to make it easy to maintain, we rebase the code with new style:
>
> I read unidiffs really poorly, in particular for asm code.  But to me,
> it seems like you undo the software pipelining of the current MIPS code,
> replacing it with plain ("naive") asm code.  I am not sure that is a
> good idea.
>

yes. you are correct.

> On which MIPS CPUs did you test and benchmark the code?  Did you not see
> performance regressions?
>

On Loongson 3A 3000.
http://loongson.cn/product/cpu/3/3A3000.html [in Chinese]

> Granted, the MIPS asm code in GMP is largely obsolete as it was
> optimised for defunct MIPS CPUs.  But having said that, I would like to
> avoid performance regressions for new as well as old implementations.
> And removing software pipelining almost always hurt performance.
>

I try to rerun the test.
The new style code has similar performance on 64bit while not on 32bit.
So we need rework on the code.

Thanks for your advicement so much.

> --
> Torbjörn
> Please encrypt, key id 0xC8601622


More information about the gmp-devel mailing list