Hi Jeff,

> Have you done any benchmarking beyond the lgamma case?  What about other 
> codebases?  glibc has the kinds of code you're looking to handle more 
> sensibly, so it'd be good to build glibc with your patch as well.
> 
> So generally supportive, but would like to see more build/benchmarking 
> data as I've seen this kind of thing go sideways before.

I measured the performance of 117 libm functions on both a Spacemit K3 board
and a XuanTie C920 board.  34/117 and 27/117 improved by over 2% on C920 and K3,
respectively.  No regression over 2% was observed on C920, yet we saw 3
regressions on K3 (as shown in the following table, which shows the execution
time reduction rate; higher is better).  The regressions seem to be related to
scheduling effects that I haven't looked at carefully yet.  Nevertheless, I
guess the overall data is promising.

+------------+-------------+-------------+
| Function   | K3 (X100)   |    C920     |
+------------+-------------+-------------+
| lgamma     |      -0.08% |     +42.85% |
| exp        |     +14.09% |     +11.59% |
| exp2       |      +9.62% |     +57.20% |
| pow        |      +8.88% |     +28.21% |
| remainderf |     +30.63% |     +33.77% |
| nextafter  |      -6.60% |     +44.35% |
| cbrtf      |      -4.30% |      +2.93% |
| cosh       |      -3.07% |     +26.00% |
+------------+-------------+-------------+

Regards,
Bohan

Reply via email to