Skip to content

cmd/asm, math: improve performance for math.Floor, math.Ceil, math.Trunc with asm on ppc64x #17185

Closed
@laboger

Description

@laboger

Please answer these questions before submitting your issue. Thanks!

What version of Go are you using (go version)?

tip

What operating system and processor architecture are you using (go env)?

Ubuntu 16.04 ppc64le

What did you do?

Built and ran the math package benchmark test.

What did you expect to see?

Better performance for floor, ceil, and trunc functions in math package.

What did you see instead?

Room for improvement

The Power instruction set includes frim, frip, and friz which can be used to implement the Go math package's floor, ceil, and trunc functions more efficiently. These instructions are used in the existing gccgo implementation for these math functions for ppc64x. These are compatible with power5 so can be used in both ppc64le & ppc64.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions