You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
significant performance regression across the board, needs investigation confirmed to be micro-architecture quirk, alleviated somewhat by various alignment tricks
This issue is mainly for tracking the implementation progress of various low-hanging fruits regarding
loong64optimizations.There are many missed optimization chances on
loong64. A quick survey on SSA intrinsics uncovers:runtime.publicationBarrierdmb stonarm64dbar 0x1Aon LA64 v1.10+ (gracefully downgrading todbar 0on LA64 v1.00) CL 577515runtime.Bswap{32,64}revb.{2w,d}on LA64 v1.00: CL 483357runtime/internal/sys.Prefetch{,Streamed}preldon LA64 v1.00runtime/internal/atomic.{And,Or}am{and,or}.don LA64 v1.00: CL 482756not possible with LA64 v1.00math.{Trunc,Ceil,Floor,RoundToEven}frint.[sd]is not orthogonal: no fixed rounding mode variants (unlike e.g.ftintr{m,p,z,ne}).math.Roundfrint.[sd]on LA64 v1.00 -- have to check if the rounding mode behavior is tolerablemath.Absfabs.[sd]on LA64 v1.00: CL 580280math.Copysignfcopysign.[sd]on LA64 v1.00: CL 580280math.FMAf{,n}m{add,sub}.[sd]on LA64 v1.00: CL 483355math/bits.TrailingZeros{64,32}(ssa.OpCtz{64,32})ctz.[wd]on LA64 v1.00: CL 479498math/bits.Len{64,32,}(ssa.OpBitLen{64,32})clz.[wd]on LA64 v1.00: CL 483356significant performance regression across the board, needs investigationconfirmed to be micro-architecture quirk, alleviated somewhat by various alignment tricksmath/bits.Reverse{64,32,8}(ssa.OpBitRev{64,32,8})bitrev.{d,w,4b}on LA64 v1.00: CL 483656We may want to implement (and preferably benchmark) all of the above.
cc @golang/loong64